home *** CD-ROM | disk | FTP | other *** search
/ AmigActive 10 / AACD 10.iso / AACD / Resources / Online / Term / Extras / Source / term-source.lha / Global.h < prev    next >
C/C++ Source or Header  |  1996-10-20  |  81KB  |  2,924 lines

  1. /*
  2. **    Global.h
  3. **
  4. **    Global data structure definitions
  5. **
  6. **    Copyright © 1990-1996 by Olaf `Olsen' Barthel
  7. **        All Rights Reserved
  8. */
  9.  
  10. #ifndef _GLOBAL_H
  11. #define _GLOBAL_H 1
  12.  
  13. #ifndef _HEADERS_H
  14. #include "Headers.h"
  15. #endif    /* _HEADERS_H */
  16.  
  17.     /* Special character codes. */
  18.  
  19. #define XOF ('S' & 0x1F)
  20. #define XON ('Q' & 0x1F)
  21.  
  22. #define BEL '\a'
  23. #define VTB '\v'
  24. #define TAB '\t'
  25. #define BKS '\b'
  26. #define ENT '\n'
  27. #define RET '\r'
  28. #define ESC '\033'
  29. #define DEL '\177'
  30. #define FFD '\f'
  31. #define CAN '\030'
  32. #define SUB '\032'
  33. #define ENQ '\005'
  34. #define SI  '\016'
  35. #define SO  '\017'
  36.  
  37.     /* Control keys we assign special codes to. */
  38.  
  39. #define CUP 150
  40. #define CDN 151
  41. #define CFW 152
  42. #define CBK 153
  43.  
  44. #define FN1 128
  45. #define FN2 129
  46. #define FN3 130
  47. #define FN4 131
  48. #define FN5 132
  49. #define FN6 133
  50. #define FN7 134
  51. #define FN8 135
  52. #define FN9 136
  53. #define F10 137
  54.  
  55. #define HLP 149
  56.  
  57.     /* Control sequence introducer. */
  58.  
  59. #define CSI 155
  60.  
  61.     /* Standard IFF chunk types. */
  62.  
  63. #ifndef ID_8SVX
  64. #define ID_8SVX    MAKE_ID('8','S','V','X')    /* Eight bit sampled voice. */
  65. #endif    /* ID_8SVX */
  66.  
  67. #ifndef ID_VHDR
  68. #define ID_VHDR    MAKE_ID('V','H','D','R')    /* Voice header. */
  69. #endif    /* ID_VHDR */
  70.  
  71. #ifndef ID_BODY
  72. #define ID_BODY    MAKE_ID('B','O','D','Y')    /* Generic data body chunk. */
  73. #endif    /* ID_BODY */
  74.  
  75. #ifndef ID_ANNO
  76. #define ID_ANNO MAKE_ID('A','N','N','O')    /* Annotation chunk. */
  77. #endif    /* ID_ANNO */
  78.  
  79. #define ID_CHAN MAKE_ID('C','H','A','N')    /* Sound channel information. */
  80. #define ID_CHRS    MAKE_ID('C','H','R','S')    /* Character data. */
  81. #define ID_FTXT    MAKE_ID('F','T','X','T')    /* Formatted text. */
  82.  
  83.     /* "term" private chunk types. */
  84.  
  85. #define ID_DATE    MAKE_ID('D','A','T','E')    /* Date and time information. */
  86. #define ID_DAT2    MAKE_ID('D','A','T','2')    /* Date and time information, second try. */
  87.  
  88. #ifndef ID_NAME
  89. #define ID_NAME    MAKE_ID('N','A','M','E')    /* Name header */
  90. #endif    /* ID_NAME */
  91.  
  92. #ifndef ID_PREF
  93. #define ID_PREF    MAKE_ID('P','R','E','F')    /* Preferences data chunk. */
  94. #endif    /* ID_PREF */
  95.  
  96. #define ID_DIAL    MAKE_ID('D','I','A','L')    /* Number of phonebook entries. */
  97. #define ID_FAST    MAKE_ID('F','A','S','T')    /* Fast! macro settings. */
  98. #define ID_TRAP    MAKE_ID('T','R','A','P')    /* Trap command. */
  99. #define ID_SEQN    MAKE_ID('S','E','Q','N')    /* Trap sequence. */
  100. #define ID_TRST MAKE_ID('T','R','S','T')    /* Trap settings. */
  101. #define ID_HOTK    MAKE_ID('H','O','T','K')    /* Hotkey settings. */
  102. #define ID_KEYS    MAKE_ID('K','E','Y','S')    /* Function key settings. */
  103. #define ID_PHON    MAKE_ID('P','H','O','N')    /* Phonebook data. */
  104. #define ID_PSWD    MAKE_ID('P','S','W','D')    /* Password entry. */
  105. #define ID_RECV    MAKE_ID('R','E','C','V')    /* Translation table data (receiver side). */
  106. #define ID_SEND    MAKE_ID('S','E','N','D')    /* Translation table data (sender side). */
  107. #define ID_TRNS    MAKE_ID('T','R','N','S')    /* Translation table data (master table). */
  108. #define ID_SPEK    MAKE_ID('S','P','E','K')    /* Speech settings. */
  109. #define ID_TERM    MAKE_ID('T','E','R','M')    /* "term" data chunk. */
  110. #define ID_VERS    MAKE_ID('V','E','R','S')    /* Version identification. */
  111. #define ID_WIND    MAKE_ID('W','I','N','D')    /* Fast! macro window size and position. */
  112. #define ID_SOUN    MAKE_ID('S','O','U','N')    /* Sound settings. */
  113. #define ID_WINF    MAKE_ID('W','I','N','F')    /* Window position/size information. */
  114. #define ID_GRUP MAKE_ID('G','R','U','P')    /* Grouping information. */
  115.  
  116.     /* "term" configuration and phonebook file chunk types. */
  117.  
  118. #ifndef ID_SERL
  119. #define ID_SERL    MAKE_ID('S','E','R','L')    /* Serial settings. */
  120. #endif    /* ID_SERL */
  121.  
  122. #define ID_MODM    MAKE_ID('M','O','D','M')    /* Modem settings. */
  123. #define ID_COMD    MAKE_ID('C','O','M','D')    /* Command settings. */
  124. #define ID_SCRN    MAKE_ID('S','C','R','N')    /* Screen settings. */
  125. #define ID_TRML    MAKE_ID('T','R','M','L')    /* Terminal setting. */
  126. #define ID_PATH    MAKE_ID('P','A','T','H')    /* Path settings. */
  127. #define ID_MISC    MAKE_ID('M','I','S','C')    /* Misc settings. */
  128. #define ID_CLIP    MAKE_ID('C','L','I','P')    /* Clip settings. */
  129. #define ID_CPTR    MAKE_ID('C','P','T','R')    /* Capture settings. */
  130. #define ID_FILE    MAKE_ID('F','I','L','E')    /* File settings. */
  131. #define ID_EMLN    MAKE_ID('E','M','L','N')    /* Emulation settings. */
  132. #define ID_XFER    MAKE_ID('X','F','E','R')    /* Transfer settings. */
  133. #define ID_XLNM    MAKE_ID('X','L','N','M')    /* Translation file name. */
  134. #define ID_MFNM    MAKE_ID('M','F','N','M')    /* Macro file name. */
  135. #define ID_CRNM    MAKE_ID('C','R','N','M')    /* Cursor file name. */
  136. #define ID_FMNM    MAKE_ID('F','M','N','M')    /* Fast macro file name. */
  137. #define ID_SPNM    MAKE_ID('S','P','N','M')    /* Speech file name. */
  138. #define ID_SONM    MAKE_ID('S','O','N','M')    /* Sound file name. */
  139. #define ID_ACNM    MAKE_ID('A','C','N','M')    /* Area code file name. */
  140. #define ID_PBNM    MAKE_ID('P','B','N','M')    /* Phonebook file name. */
  141. #define ID_HKNM    MAKE_ID('H','K','N','M')    /* Hotkey file name. */
  142. #define ID_TRNM    MAKE_ID('T','R','N','M')    /* Trap file name. */
  143.  
  144.     /* This still appears to be missing. */
  145.  
  146. #ifndef FORMAT_DEF
  147. #define FORMAT_DEF 4
  148. #endif    /* FORMAT_DEF */
  149.  
  150.     /* Single precision boolean value. */
  151.  
  152. typedef char BOOLEAN;
  153.  
  154.     /* Structure forward declarations for the GNU `C' compiler. */
  155.  
  156. #ifdef __GNUC__
  157. struct MsgItem;
  158. struct GenericList;
  159. #endif    /* __GNUC__ */
  160.  
  161.     /* The configuration file format version. This will from now
  162.      * on hopefully stay the same.
  163.      */
  164.  
  165. #define CONFIG_FILE_VERSION    4
  166. #define CONFIG_FILE_REVISION    3
  167.  
  168.     /* The name of the global `term' message port. */
  169.  
  170. #define TERMPORTNAME "term Port"
  171.  
  172.     /* IDCMP flags for the main window */
  173.  
  174. #define DEFAULT_IDCMP        (IDCMP_RAWKEY | IDCMP_INACTIVEWINDOW | IDCMP_ACTIVEWINDOW | IDCMP_MOUSEMOVE | IDCMP_GADGETUP | IDCMP_GADGETDOWN | IDCMP_MENUPICK | IDCMP_MOUSEMOVE | IDCMP_MOUSEBUTTONS | IDCMP_CLOSEWINDOW | IDCMP_NEWSIZE | IDCMP_IDCMPUPDATE | IDCMP_MENUHELP)
  175.  
  176.     /* The interval in which routine checks are executed (in seconds). */
  177.  
  178. #define ROUTINE_CHECK_INTERVAL    2
  179.  
  180.     /* Jump table entry. */
  181.  
  182. typedef BOOL (* JUMP)(LONG Char);
  183.  
  184.     /* Capture output routine. */
  185.  
  186. typedef VOID (* COPTR)(APTR Data,LONG Size);
  187.  
  188.     /* ConTransfer callback routine. */
  189.  
  190. typedef VOID (* CONTRANSFER)(STRPTR,LONG);
  191.  
  192.     /* Simple text transfer callback routine. */
  193.  
  194. typedef BOOL (* SENDLINE)(STRPTR,LONG);
  195.  
  196.     /* PutChar routine for RawDoFmt(). */
  197.  
  198. typedef VOID (* PUTCHAR)(UBYTE Char,APTR PutChData);
  199.  
  200.     /* Mode filter function callback. */
  201.  
  202. typedef ULONG (* MODEFILTER)(ULONG,APTR);
  203.  
  204.     /* Stackcall routine type. */
  205.  
  206. typedef LONG (* STACKARGS STACKCALL)(ULONG Arg1,...);
  207.  
  208.     /* The routine to do the comparison for QuickSort. */
  209.  
  210. typedef int (* SORTFUNC)(const void * , const void *);
  211.  
  212.     /* CR/LF receiver translation */
  213.  
  214. typedef LONG (* TRANSLATEFUNC)(STRPTR Data,LONG Size);
  215.  
  216.     /* Raster save callback routine. */
  217.  
  218. typedef VOID (* SAVERASTER)(LONG First,LONG Last);
  219.  
  220.     /* Bypass for serial output. */
  221.  
  222. typedef BOOL (* BYPASS)(STRPTR Buffer,LONG Size);
  223.  
  224.     /* Normal serial output. */
  225.  
  226. typedef VOID (* SERWRITE)(STRPTR Buffer,LONG Size);
  227.  
  228.     /* This defines the destructor data type */
  229.  
  230. typedef VOID (* DESTRUCTOR)(struct MsgItem *);
  231.  
  232.     /* The generic list notify function. */
  233.  
  234. typedef VOID (* GENERICNOTIFY)(struct GenericList *List,WORD Login);
  235.  
  236.     /* A task or process entry function. */
  237.  
  238. typedef VOID (* STACKARGS TASKENTRY)(LONG Arg,...);
  239.  
  240.     /* Menu item codes. */
  241.  
  242. enum    {    MEN_SAVE_AS_PICTURE=1,MEN_SAVE_AS_TEXT,MEN_PRINT_SCREEN,MEN_PRINT_CLIP,MEN_CAPTURE_TO_FILE,
  243.         MEN_CAPTURE_TO_PRINTER,MEN_ICONIFY,MEN_ABOUT,MEN_QUIT,
  244.  
  245.         MEN_COPY,MEN_PASTE,MEN_CLEAR,
  246.  
  247.         MEN_EXECUTE_DOS_COMMAND,MEN_EXECUTE_REXX_COMMAND,MEN_RECORD,MEN_RECORD_LINE,
  248.         MEN_EDIT_TRAPS,MEN_DISABLE_TRAPS,
  249.  
  250.         MEN_PHONEBOOK,MEN_REDIAL,MEN_DIAL_NUMBER,MEN_SEND_BREAK,
  251.         MEN_HANG_UP,MEN_WAIT,MEN_FLUSH_BUFFER,MEN_RELEASE_DEVICE,
  252.  
  253.         MEN_UPLOAD_ASCII,MEN_DOWNLOAD_ASCII,MEN_UPLOAD_TEXT,MEN_DOWNLOAD_TEXT,MEN_EDIT_AND_UPLOAD_TEXT,
  254.         MEN_UPLOAD_BINARY,MEN_DOWNLOAD_BINARY,
  255.  
  256.         MEN_CLEAR_BUFFER,MEN_DISPLAY_BUFFER,MEN_CLOSE_BUFFER,MEN_FREEZE_BUFFER,MEN_OPEN_BUFFER,
  257.         MEN_SAVE_BUFFER_AS,
  258.  
  259.         MEN_CLEAR_SCREEN,MEN_RESET_FONT,MEN_RESET_STYLES,MEN_RESET_TERMINAL,
  260.  
  261.         MEN_SERIAL,MEN_MODEM,MEN_SCREEN,MEN_TERMINAL,MEN_SET_EMULATION,MEN_CLIPBOARD,MEN_CAPTURE,MEN_COMMANDS,
  262.         MEN_MISC,MEN_PATH,MEN_TRANSFER_PROTOCOL,MEN_TRANSFER,MEN_TRANSLATION,MEN_MACROS,
  263.         MEN_CURSORKEYS,MEN_FAST_MACROS,MEN_HOTKEYS,MEN_SPEECH,MEN_SOUND,MEN_RATES,MEN_SET_CONSOLE,MEN_OPEN_SETTINGS,MEN_SAVE_SETTINGS,
  264.         MEN_SAVE_SETTINGS_AS,
  265.  
  266.         MEN_STATUS_WINDOW,MEN_REVIEW_WINDOW,MEN_PACKET_WINDOW,MEN_CHAT_LINE,MEN_FAST_MACROS_WINDOW,
  267.         MEN_UPLOAD_QUEUE_WINDOW,
  268.  
  269.         /* Avoid recompilation */
  270.  
  271.         MEN_PRINT_SCREEN_AS_GFX,
  272.         MEN_EXTRA_DIAL,
  273.         MEN_MATRIX_WINDOW,
  274.         MEN_CAPTURE_TO_RAW_FILE,
  275.         MEN_SELECT_ALL
  276.     };
  277.  
  278.     /* Menu item code limit, required by the quick dial menu. */
  279.  
  280. #define DIAL_MENU_LIMIT 1000
  281.  
  282.     /* How many phone book entries will be stored in
  283.      * the quick dial menu.
  284.      */
  285.  
  286. #define DIAL_MENU_MAX    50
  287.  
  288.     /* The size of the attention scanner buffers. */
  289.  
  290. #define ATTENTION_BUFFER_SIZE 260
  291.  
  292.     /* The maximum length of a password. */
  293.  
  294. #define MAX_PASSWORD_LENGTH 20
  295.  
  296.     /* Undefine the following symbols, the preferences header file
  297.      * will use the same names and the same values.
  298.      */
  299.  
  300. #undef PARITY_NONE
  301. #undef PARITY_EVEN
  302. #undef PARITY_ODD
  303. #undef PARITY_MARK
  304. #undef PARITY_SPACE
  305.  
  306.     /* Serial settings. */
  307.  
  308. enum    {    PARITY_NONE,PARITY_EVEN,PARITY_ODD,PARITY_MARK,PARITY_SPACE };
  309.  
  310. enum    {    HANDSHAKING_NONE,HANDSHAKING_RTSCTS,HANDSHAKING_RTSCTS_DSR };
  311. enum    {    DUPLEX_FULL,DUPLEX_HALF };
  312. enum    {    FLOW_NONE,FLOW_XON_XOFF };
  313.  
  314.     /* Terminal settings. */
  315.  
  316. enum    {    EOL_IGNORE,EOL_CR,EOL_LF,EOL_CRLF,EOL_LFCR };
  317. enum    {    EMULATION_ANSIVT100,EMULATION_ATOMIC,EMULATION_TTY,EMULATION_EXTERNAL,EMULATION_HEX };
  318. enum    {    COLOUR_AMIGA,COLOUR_EIGHT,COLOUR_SIXTEEN,COLOUR_MONO };
  319.  
  320.     /* Protocol types. */
  321.  
  322. enum    {    PROTOCOL_XMODEM,PROTOCOL_XMODEMCRC,PROTOCOL_YMODEM,PROTOCOL_ZMODEM };
  323.  
  324.     /* Font types. */
  325.  
  326. enum    {    FONT_STANDARD,FONT_IBM,FONT_IBM_RAW };
  327.  
  328.     /* Bell modes. */
  329.  
  330. enum    {    BELL_NONE, BELL_VISIBLE, BELL_AUDIBLE, BELL_BOTH, BELL_SYSTEM };
  331.  
  332.     /* Data flow scanner indices. */
  333.  
  334. enum    {    SCAN_NOCARRIER, SCAN_CONNECT, SCAN_VOICE, SCAN_RING, SCAN_BUSY, SCAN_NODIALTONE,
  335.         SCAN_OK, SCAN_ERROR, SCAN_SIGDEFAULTUPLOAD, SIG_DEFAULTUPLOAD,
  336.         SCAN_SIGASCIIUPLOAD,SCAN_SIGASCIIDOWNLOAD, SCAN_SIGTEXTUPLOAD,
  337.         SCAN_SIGTEXTDOWNLOAD, SCAN_SIGBINARYUPLOAD,
  338.         SCAN_SIGBINARYDOWNLOAD, SCAN_COUNT
  339.     };
  340.  
  341.     /* Status types. */
  342.  
  343. enum    {    STATUS_READY,STATUS_HOLDING,STATUS_DIALING,STATUS_UPLOAD,
  344.         STATUS_DOWNLOAD,STATUS_BREAKING,STATUS_HANGUP,
  345.         STATUS_RECORDING,STATUS_RECORDING_LINE,STATUS_AREXX
  346.     };
  347.  
  348.     /* Sound types. */
  349.  
  350. enum    {    SOUND_BELL,SOUND_CONNECT,SOUND_DISCONNECT,SOUND_GOODTRANSFER,
  351.         SOUND_BADTRANSFER,SOUND_RING,SOUND_VOICE,SOUND_ERROR,
  352.         SOUND_COUNT
  353.     };
  354.  
  355.     /* Settings types. */
  356.  
  357. enum    {    PREF_ALL,PREF_SERIAL,PREF_MODEM,PREF_COMMAND,PREF_SCREEN,
  358.         PREF_TERMINAL,PREF_PATH,PREF_MISC,PREF_CLIP,PREF_CAPTURE,
  359.         PREF_FILE,PREF_EMULATION,PREF_TRANSFER,PREF_TRANSLATIONFILENAME,
  360.         PREF_MACROFILENAME,PREF_CURSORFILENAME,PREF_FASTMACROFILENAME,
  361.         PREF_SPEECHFILENAME,PREF_SOUNDFILENAME,PREF_AREACODEFILENAME,
  362.         PREF_PHONEBOOKFILENAME,PREF_HOTKEYFILENAME,PREF_TRAPFILENAME,
  363.         PREF_RATES    /* Note: PREF_RATES must always be last */
  364.     };
  365.  
  366.     /* Gadgets attached to the main window. */
  367.  
  368. enum    {    CHAT_GadgetID=400 };
  369.  
  370.     /* Status line modes. */
  371.  
  372. enum    {    STATUSLINE_DISABLED,STATUSLINE_STANDARD,STATUSLINE_COMPRESSED };
  373.  
  374.     /* Capture filter modes. */
  375.  
  376. enum    {    FILTER_NONE,FILTER_ESCAPE,FILTER_CONTROL,FILTER_BOTH };
  377.  
  378.     /* Scrolling modes. */
  379.  
  380. enum    {    SCROLL_JUMP,SCROLL_SMOOTH };
  381.  
  382.     /* Auto-capture file creation. */
  383.  
  384. enum    {    AUTOCAPTURE_DATE_NAME,AUTOCAPTURE_DATE_INCLUDE };
  385.  
  386.     /* Cursor and numeric keypad modes. */
  387.  
  388. enum    {    KEYMODE_STANDARD,KEYMODE_APPLICATION };
  389.  
  390.     /* Font scales. */
  391.  
  392. enum    {    SCALE_NORMAL,SCALE_HALF };
  393. enum    {    SCALE_ATTR_NORMAL,SCALE_ATTR_TOP2X,SCALE_ATTR_BOT2X,SCALE_ATTR_2X };
  394.  
  395.     /* Character tables. */
  396.  
  397. enum    {    TABLE_ASCII,TABLE_GFX };
  398.  
  399.     /* Transfer types. */
  400.  
  401. enum    {    TRANSFER_BINARY,TRANSFER_TEXT,TRANSFER_ASCII };
  402.  
  403.     /* Translation table entry types. */
  404.  
  405. enum    {    TRANSLATE_SINGLE,TRANSLATE_STRING };
  406.  
  407.     /* Upload panel actions. */
  408.  
  409. enum    {    UPLOAD_TEXT=1,UPLOAD_BINARY,UPLOAD_IGNORE,UPLOAD_ABORT,
  410.         UPLOAD_TEXT_FROM_LIST,UPLOAD_BINARY_FROM_LIST,UPLOAD_DUMMY
  411.     };
  412.  
  413.     /* Alert types. */
  414.  
  415. enum    {    ALERT_NONE,ALERT_BEEP,ALERT_SCREEN,ALERT_BEEP_SCREEN };
  416.  
  417.     /* Online time display modes. */
  418.  
  419. enum    {    ONLINETIME_TIME,ONLINETIME_COST,ONLINETIME_BOTH };
  420.  
  421.     /* What to print. */
  422.  
  423. enum    {    PRINT_SCREEN,PRINT_CLIP };
  424.  
  425.     /* Dial command types. */
  426.  
  427. enum    {    DIAL_IGNORE,DIAL_LIST,DIAL_REDIAL,DIAL_MENU };
  428.  
  429.     /* Errors returned by ReconfigureSerial(). */
  430.  
  431. enum    {    RECONFIGURE_FAILURE,RECONFIGURE_NOCHANGE,RECONFIGURE_SUCCESS };
  432.  
  433.     /* Operation codes for SetItem(). */
  434.  
  435. enum    {    SETITEM_SETCHECK,SETITEM_CLRCHECK,SETITEM_ON,SETITEM_OFF };
  436.  
  437.     /* File identification actions. */
  438.  
  439. enum    {    IDENTIFY_IGNORE,IDENTIFY_FILETYPE,IDENTIFY_SOURCE };
  440.  
  441.     /* Generic list types. */
  442.  
  443. enum    {    GLIST_UPLOAD,GLIST_DOWNLOAD,GLIST_DIAL,GLIST_WAIT,GLIST_TRAP,GLIST_COUNT };
  444.  
  445.     /* Generic list add operations. */
  446.  
  447. enum    {    ADD_GLIST_BOTTOM,ADD_GLIST_TOP,ADD_GLIST_BEHIND,ADD_GLIST_BEFORE };
  448.  
  449.     /* Dialing modes. */
  450.  
  451. enum    {    DIALMODE_PULSE, DIALMODE_TONE, DIALMODE_MODEM, DIALMODE_ISDN };
  452.  
  453.     /* Transfer window gadgets. */
  454.  
  455. enum    {    GAD_TRANSFER_INFORMATION_LIST=1,
  456.         GAD_TRANSFER_PERCENT,GAD_TRANSFER_TIME,
  457.         GAD_TRANSFER_ABORT,GAD_TRANSFER_SKIP,
  458.         GAD_TRANSFER_PROTOCOL,GAD_TRANSFER_FILE,
  459.         GAD_TRANSFER_SIZE,GAD_TRANSFER_SECONDS,
  460.         GAD_TRANSFER_TOTALTIME,GAD_TRANSFER_ERRORS,
  461.         GAD_TRANSFER_ABORT_FILE
  462.     };
  463.  
  464.     /* How to satisfy OwnDevUnit.library requests. */
  465.  
  466. enum    {    ODU_RELEASE,ODU_WAIT,ODU_KEEP };
  467.  
  468.     /* When to notify the user during a file transfer. */
  469.  
  470. enum    {    XFERNOTIFY_NEVER,XFERNOTIFY_ALWAYS,XFERNOTIFY_START,XFERNOTIFY_END };
  471.  
  472.     /* XPR options setting. */
  473.  
  474. enum    {    GAD_XPROPTIONS_USE=42,GAD_XPROPTIONS_CANCEL };
  475.  
  476.     /* Terminal types */
  477.  
  478. enum    {    TERMINAL_VT200,TERMINAL_VT102,TERMINAL_VT101,TERMINAL_VT100 };
  479.  
  480.     /* Call log file formats */
  481.  
  482. enum    {    LOGFILEFORMAT_CallInfo,LOGFILEFORMAT_PhoneLog };
  483.  
  484.     /* AmigaGuide help context. */
  485.  
  486. enum    {    CONTEXT_MAIN,CONTEXT_SERIAL,CONTEXT_MODEM,CONTEXT_SCREEN,
  487.         CONTEXT_TERMINAL,CONTEXT_CLIP,CONTEXT_CAPTURE,CONTEXT_COMMAND,
  488.         CONTEXT_MISC,CONTEXT_PATHS,CONTEXT_TRANSLATION,CONTEXT_MACROS,
  489.         CONTEXT_CURSOR,CONTEXT_FASTMACROS,CONTEXT_HOTKEYS,CONTEXT_SPEECH,
  490.         CONTEXT_EMULATION,CONTEXT_TRANSFER,CONTEXT_PHONEBOOK,CONTEXT_DATE,
  491.         CONTEXT_DAY,CONTEXT_IMPORT,CONTEXT_RATES,CONTEXT_TIME,
  492.         CONTEXT_COPY,CONTEXT_PASSWORDUSER,CONTEXT_DIAL,CONTEXT_PRINT,
  493.         CONTEXT_TEXTBUFFER,CONTEXT_PACKETWINDOW,CONTEXT_SOUND,
  494.         CONTEXT_LIBS,CONTEXT_ASCII,CONTEXT_PENS,CONTEXT_UPLOAD_QUEUE,
  495.         CONTEXT_TRAPS,CONTEXT_AREA_CODES,CONTEXT_MAIN_MENU,
  496.         CONTEXT_BUFFER_MENU,CONTEXT_PACKET_MENU,CONTEXT_PROJECT_MEN,
  497.         CONTEXT_EDIT_MEN,CONTEXT_CMDS_MEN,CONTEXT_PHONE_MEN,
  498.         CONTEXT_TRANSF_MEN,CONTEXT_BUFFER_MEN,CONTEXT_TERMINAL_MEN,
  499.         CONTEXT_SETTINGS_MEN,CONTEXT_WINDOWS_MEN,CONTEXT_DIAL_MEN,
  500.         CONTEXT_TEXTPEN_PANEL,CONTEXT_ASCII_TRANSFER_SETTINGS,
  501.         CONTEXT_PARAMETERS,CONTEXT_SIGNATURE
  502.  
  503.     };
  504.  
  505.     /* Character types. */
  506.  
  507. enum    {    CHAR_VANILLA,CHAR_CURSOR,CHAR_FUNCTION,CHAR_HELP,
  508.         CHAR_XON,CHAR_XOFF,CHAR_ENTER,CHAR_RETURN };
  509.  
  510.     /* Review window positioning codes. */
  511.  
  512. enum    {    REVIEW_MOVE_TOP,REVIEW_MOVE_BOTTOM,REVIEW_MOVE_UP,REVIEW_MOVE_DOWN };
  513.  
  514.     /* File type classes. */
  515.  
  516. enum    {    FILETYPE_NONE,FILETYPE_DIR,FILETYPE_FILE,FILETYPE_TEXT,FILETYPE_SOUND,
  517.         FILETYPE_PICTURE,FILETYPE_PREFS,FILETYPE_ARCHIVE,
  518.         FILETYPE_PROGRAM,
  519.  
  520.         FILETYPE_COUNT };
  521.  
  522.     /* Text pacing modes. */
  523.  
  524. enum    {    PACE_DIRECT,PACE_ECHO,PACE_ANYECHO,PACE_PROMPT,PACE_DELAY,PACE_KEYBOARD };
  525.  
  526.     /* Where to open the buffer text window. */
  527.  
  528. enum    {    BUFFER_TOP,BUFFER_END };
  529.  
  530.     /* Where to place the buffer screen horizontally. */
  531.  
  532. enum    {    SCREEN_LEFT,SCREEN_CENTRE,SCREEN_RIGHT };
  533.  
  534.     /* File transfer mode. */
  535.  
  536. enum    {    XFER_XPR,XFER_EXTERNALPROGRAM,XFER_DEFAULT,XFER_INTERNAL };
  537.  
  538.     /* File transfer protocol signatures. */
  539.  
  540. enum    {    TRANSFERSIG_DEFAULTUPLOAD,TRANSFERSIG_DEFAULTDOWNLOAD,
  541.         TRANSFERSIG_ASCIIUPLOAD,TRANSFERSIG_ASCIIDOWNLOAD,
  542.         TRANSFERSIG_TEXTUPLOAD,TRANSFERSIG_TEXTDOWNLOAD,
  543.         TRANSFERSIG_BINARYUPLOAD,TRANSFERSIG_BINARYDOWNLOAD
  544.     };
  545.  
  546.     /* Requester modes. */
  547.  
  548. enum    {    REQUESTERMODE_CENTRE,REQUESTERMODE_PREFS,
  549.         REQUESTERMODE_IGNORE
  550.     };
  551.  
  552.     /* Buffer capture modes. */
  553.  
  554. enum    {    BUFFERMODE_FLOW, BUFFERMODE_REVIEW };
  555.  
  556.     /* How to sort the phonebook. */
  557.  
  558. enum    {    SORT_NAME,SORT_NUMBER,SORT_COMMENT,SORT_SELECTION };
  559.  
  560.     /* How to move list nodes around. */
  561.  
  562. enum    {    MOVE_HEAD,MOVE_PRED,MOVE_SUCC,MOVE_TAIL };
  563.  
  564.     /* Some raw key codes. */
  565.  
  566. #define HELP_CODE        95
  567. #define DEL_CODE        70
  568. #define BACKSPACE_CODE        65
  569. #define RAMIGA_CODE        103
  570. #define TAB_CODE        66
  571.  
  572. #define CURSOR_UP_CODE        76
  573. #define CURSOR_DOWN_CODE    77
  574. #define CURSOR_RIGHT_CODE    78
  575. #define CURSOR_LEFT_CODE    79
  576.  
  577. #define F01_CODE        80
  578. #define F02_CODE        81
  579. #define F03_CODE        82
  580. #define F04_CODE        83
  581. #define F05_CODE        84
  582. #define F06_CODE        85
  583. #define F07_CODE        86
  584. #define F08_CODE        87
  585. #define F09_CODE        88
  586. #define F10_CODE        89
  587.  
  588. #define ALT_KEY            (IEQUALIFIER_LALT|IEQUALIFIER_RALT)
  589. #define SHIFT_KEY        (IEQUALIFIER_LSHIFT|IEQUALIFIER_RSHIFT)
  590. #define CONTROL_KEY        IEQUALIFIER_CONTROL
  591.  
  592.     /* A couple of useful minterms. */
  593.  
  594. #define MINTERM_ZERO        0
  595. #define MINTERM_ONE        ABC | ABNC | ANBC | ANBNC | NABC | NABNC | NANBC | NANBNC
  596. #define MINTERM_COPY        ABC | ABNC | NABC | NABNC
  597. #define MINTERM_NOT_C        ABNC | ANBNC | NABNC | NANBNC
  598. #define MINTERM_B_AND_C        ABC | NABC
  599. #define MINTERM_NOT_B_AND_C    ANBC | NANBC
  600. #define MINTERM_B_OR_C        ABC | ABNC | NABC | NABNC | ANBC | NANBC
  601.  
  602.     /* Printer control bits. */
  603.  
  604. #define PRINT_SERIAL    (1L << 0)
  605. #define PRINT_MODEM    (1L << 1)
  606. #define PRINT_SCREEN    (1L << 2)
  607. #define PRINT_TERMINAL    (1L << 3)
  608. #define PRINT_USERNAME    (1L << 4)
  609. #define PRINT_COMMENT    (1L << 5)
  610. #define PRINT_SIZE    (1L << 6)
  611. #define PRINT_DATE    (1L << 7)
  612. #define PRINT_BITS    (1L << 8)
  613.  
  614.     /* Day of week flags. */
  615.  
  616. #define DAY_MONDAY    (1L << 0)
  617. #define DAY_TUESDAY    (1L << 1)
  618. #define DAY_WEDNESDAY    (1L << 2)
  619. #define DAY_THURSDAY    (1L << 3)
  620. #define DAY_FRIDAY    (1L << 4)
  621. #define DAY_SATURDAY    (1L << 5)
  622. #define DAY_SUNDAY    (1L << 6)
  623.  
  624.     /* These signal masks will make life a bit easier. */
  625.  
  626. #define SIG_WINDOW    (1L << Window -> UserPort -> mp_SigBit)
  627. #define SIG_SERIAL    (ReadPort ? 1L << ReadPort -> mp_SigBit : NULL)
  628. #define SIG_TIMER    (1L << TimePort -> mp_SigBit)
  629. #define SIG_QUEUE    (SpecialQueue -> SigMask)
  630. #define SIG_CHECK    (1L << CheckBit)
  631. #define SIG_REXX    (1L << TermRexxPort -> mp_SigBit)
  632. #define SIG_OWNDEVUNIT    (1L << OwnDevBit)
  633.  
  634.     /* Task termination and handshake signal.
  635.      * Note: don't try this at home kids.
  636.      */
  637.  
  638. #define SIG_KILL    SIGBREAKF_CTRL_C
  639. #define SIG_HANDSHAKE    SIGF_SINGLE
  640.  
  641.     /* Double-buffered file server command. */
  642.  
  643. #define    SIG_COMMAND    SIGBREAKF_CTRL_D
  644.  
  645.     /* ARexx break signal. */
  646.  
  647. #define SIG_BREAK    SIGBREAKF_CTRL_D
  648.  
  649.     /* Hotkey reset command. */
  650.  
  651. #define SIG_RESET    SIGBREAKF_CTRL_D
  652.  
  653.     /* Skip dial entry. */
  654.  
  655. #define SIG_SKIP    SIGBREAKF_CTRL_D
  656.  
  657.     /* Status commands. */
  658.  
  659. #define SIG_BELL    SIGBREAKF_CTRL_D
  660. #define SIG_RESETTIME    SIGBREAKF_CTRL_E
  661.  
  662.     /* Buffer special signals. */
  663.  
  664. #define SIG_TOFRONT    SIGBREAKF_CTRL_D
  665. #define SIG_UPDATE    SIGBREAKF_CTRL_E
  666. #define SIG_MOVEUP    SIGBREAKF_CTRL_F
  667.  
  668.     /* Status display task. */
  669.  
  670. #define SIG_CLOSEWINDOW    SIGBREAKF_CTRL_F
  671.  
  672.     /* Upload queue. */
  673.  
  674. #define SIG_SHOW    SIGBREAKF_CTRL_D
  675. #define SIG_HIDE    SIGBREAKF_CTRL_E
  676. #define SIG_GOAWAY    SIGBREAKF_CTRL_F
  677.  
  678.     /* A port signal mask. */
  679.  
  680. #define PORTMASK(P)    (1L << (((struct MsgPort *)(P)) -> mp_SigBit))
  681.  
  682.     /* Replacements for CheckItem() and OnMenu()/OffMenu(). */
  683.  
  684. #define CheckItem(ID,Mode)    SetItem(ID,Mode ? SETITEM_SETCHECK : SETITEM_CLRCHECK)
  685. #define OnItem(ID)        SetItem(ID,SETITEM_ON)
  686. #define OffItem(ID)        SetItem(ID,SETITEM_OFF)
  687.  
  688.     /* A handy signal macro. */
  689.  
  690. #define ClrSignal(Signals)    SetSignal(0,Signals)
  691.  
  692.     /* Another neat macro. */
  693.  
  694. #define NUM_ELEMENTS(s)        (sizeof(s) / sizeof((s)[0]))
  695.  
  696.     /* Definitions to access the line signal setting functions supported by
  697.      * some serial IO boards (namely the ASDG board).
  698.      */
  699.  
  700. #define SIOCMD_SETCTRLLINES    (CMD_NONSTD + 7)
  701. #define SIOB_RTSB        0
  702. #define SIOB_DTRB        1
  703. #define SIOB_RTSF        (1L << SIOB_RTSB)
  704. #define SIOB_DTRF        (1L << SIOB_DTRB)
  705.  
  706.     /* Turn time of day into `compressed' format. */
  707.  
  708. #define DT_GET_TIME(Hour,Minute) ((Minute) / 10 + (Hour) * 6)
  709.  
  710.     /* Vector offsets for the TimeDate structure. */
  711.  
  712. enum    { DT_FIRST_UNIT,DT_NEXT_UNIT };
  713.  
  714.     /* Multiply lines and columns with the current font size. */
  715.  
  716. #define MUL_X(x)        OffsetXTable[x]
  717. #define MUL_Y(y)        OffsetYTable[y]
  718.  
  719.     /* This macro lets us long-align structures on the stack */
  720.  
  721. #define D_S(type,name)    char a_##name[sizeof(type)+3]; \
  722.             type *name = (type *)((LONG)(a_##name+3) & ~3);
  723.  
  724.     /* Like sizeof(..), but for a structure entry. */
  725.  
  726. #define structsizeof(s,e)    sizeof(((struct s *)0)->e)
  727.  
  728.     /* A handy and short alias. */
  729.  
  730. #define TICK            (CHECKIT | MENUTOGGLE)
  731.  
  732.     /* For now the maximum length of a path/file name. */
  733.  
  734. #define MAX_FILENAME_LENGTH    256
  735.  
  736.     /* The maximum width of a line to be stored in the text buffer. */
  737.  
  738. #define BUFFER_LINE_MAX        255
  739.  
  740.     /* User interface definitions. */
  741.  
  742. #define SZ_AutoWidth    TAG_USER+2    /* Use default width? */
  743. #define SZ_NewColumn    TAG_USER+4    /* Start new column */
  744. #define SZ_Lines    TAG_USER+5    /* Number of lines in object */
  745.  
  746.     /* Box information types. */
  747.  
  748. enum    {    BOX_LEFT,BOX_TOP,BOX_WIDTH,BOX_HEIGHT };
  749.  
  750.     /* Status gadget properties. */
  751.  
  752. #define SGA_FullWidth    (TAG_USER+42)
  753. #define SGA_Mode    (TAG_USER+43)
  754.  
  755.     /* Sizing gadget sizes. */
  756.  
  757. #define SIZE_GADGET_WIDTH_HIGH    18
  758. #define SIZE_GADGET_WIDTH_LOW    13
  759.  
  760.     /* Some windows to be opened on the main screen. */
  761.  
  762. enum    {    WINDOW_PACKET=100,WINDOW_STATUS,
  763.         WINDOW_REVIEW,WINDOW_FAST,WINDOW_MAIN,
  764.         WINDOW_CHARTAB,WINDOW_QUEUE,WINDOW_FILETRANSFER
  765.     };
  766.  
  767.     /* Window alignment information. */
  768.  
  769. #define WC_ALIGNLEFT    (1<<0)
  770. #define WC_ALIGNRIGHT    (1<<1)
  771. #define WC_ALIGNTOP    (1<<2)
  772. #define WC_ALIGNBOTTOM    (1<<3)
  773. #define WC_EXPANDWIDTH    (1<<4)
  774. #define WC_EXPANDHEIGHT    (1<<5)
  775. #define WC_ALIGNSIDE    (1<<6)
  776. #define WC_ALIGNBELOW    (1<<7)
  777.  
  778.     /* To turn printable characters into control characters. */
  779.  
  780. #define CONTROL_(x)    (x & 0x1F)
  781.  
  782.     /* Screen mode list entry. */
  783.  
  784. struct ModeNode
  785. {
  786.     struct Node    Node;
  787.     ULONG        DisplayID;
  788. };
  789.  
  790.     /* Trap management. */
  791.  
  792. struct TrapNode
  793. {
  794.     struct Node    Node;
  795.     LONG        Count,
  796.             SequenceLen;
  797.     STRPTR        Sequence,
  798.             Command;
  799. };
  800.  
  801.     /* Trap preferences, not much. */
  802.  
  803. struct TrapSettings
  804. {
  805.     BOOLEAN        Enabled;
  806.     BOOLEAN        Filter;
  807. };
  808.  
  809.     /* Window alignment data. */
  810.  
  811. struct WindowInfo
  812. {
  813.     WORD    ID;
  814.     UWORD    WindowFlags;
  815.  
  816.     LONG    Left,
  817.         Top,
  818.         Width,
  819.         Height;
  820. };
  821.  
  822.     /* Special character treatment. */
  823.  
  824. struct SpecialKey
  825. {
  826.     UBYTE    Key;
  827.     JUMP    Routine;
  828. };
  829.  
  830.     /* Cursor backup data. */
  831.  
  832. struct CursorData
  833. {
  834.     struct TextFont    *CurrentFont;
  835.     WORD         CursorX,
  836.              CursorY;
  837.     UBYTE         Charset;
  838.     UBYTE         CharMode[2];
  839.     UBYTE         Attributes;
  840.     UBYTE         FgPen,
  841.              BgPen;
  842.     UBYTE         Style;
  843. };
  844.  
  845.     /* File transfer information. */
  846.  
  847. struct FileTransferNode
  848. {
  849.     struct MinNode     MinNode;
  850.     ULONG         Size;
  851.     STRPTR         Name;
  852. };
  853.  
  854. struct FileTransferInfo
  855. {
  856.     struct MinList         FileList;
  857.     ULONG             TotalSize;
  858.     LONG             TotalFiles;
  859.  
  860.     ULONG             DoneSize;
  861.     LONG             DoneFiles;
  862.  
  863.     struct FileTransferNode    *CurrentFile;
  864.     ULONG             CurrentSize;
  865. };
  866.  
  867.     /* Global data link. */
  868.  
  869. struct TermPort
  870. {
  871.     struct MsgPort         MsgPort;
  872.  
  873.     struct Window        *TopWindow;
  874.  
  875.     struct SignalSemaphore     OpenSemaphore;
  876.  
  877.     LONG             ID,OpenCount,HoldIt;
  878.     LONG             Reserved[5];
  879. };
  880.  
  881.     /* Buffer search support. */
  882.  
  883. struct SearchInfo
  884. {
  885.     UBYTE    Distance[256],
  886.         Pattern[256];
  887.     LONG    FoundX,
  888.         FoundY;
  889.     WORD    PatternWidth;
  890.     WORD    Index;
  891.     BOOLEAN    Forward,
  892.         IgnoreCase,
  893.         WholeWords;
  894. };
  895.  
  896. struct SearchContext
  897. {
  898.     struct Window        *SearchWindow;
  899.     struct LayoutHandle    *SearchHandle;
  900.  
  901.     UBYTE             LocalBuffer[256];
  902.     STRPTR             Buffer;
  903.  
  904.     BOOLEAN             Ok;
  905. };
  906.  
  907.     /* Support for optimized scrolling routines. */
  908.  
  909. struct ScrollLineInfo
  910. {
  911.     LONG    Left,Right,Width,
  912.         ColourMask;
  913. };
  914.  
  915.     /* A Fast! macro list entry. */
  916.  
  917. struct MacroNode
  918. {
  919.     struct Node    Node;
  920.     UBYTE        Macro[30];    /* Macro title */
  921.     UBYTE        Code[256];    /* The execution code. */
  922. };
  923.  
  924.     /* Speech preferences. */
  925.  
  926. struct SpeechConfig
  927. {
  928.     WORD    Rate,
  929.         Pitch;
  930.     LONG    Frequency;
  931.     BOOLEAN    Sex,
  932.         Volume,
  933.         Enabled;
  934.     BYTE    Pad;
  935. };
  936.  
  937.     /* Sound preferences */
  938.  
  939. struct SoundConfig
  940. {
  941.     UBYTE    BellFile[MAX_FILENAME_LENGTH],
  942.  
  943.         ConnectFile[MAX_FILENAME_LENGTH],
  944.         DisconnectFile[MAX_FILENAME_LENGTH],
  945.  
  946.         GoodTransferFile[MAX_FILENAME_LENGTH],
  947.         BadTransferFile[MAX_FILENAME_LENGTH],
  948.  
  949.         RingFile[MAX_FILENAME_LENGTH],
  950.         VoiceFile[MAX_FILENAME_LENGTH];
  951.  
  952.     BOOLEAN    Preload;
  953.     BYTE    Pad;
  954.     BOOLEAN    Volume;
  955.     BYTE    Pad2;
  956.  
  957.     UBYTE    ErrorNotifyFile[MAX_FILENAME_LENGTH];
  958. };
  959.  
  960.     /* Macro Preferences. */
  961.  
  962. struct MacroKeys
  963. {
  964.     UBYTE    Keys[4][10][256];
  965. };
  966.  
  967.     /* Cursor key preferences. */
  968.  
  969. struct CursorKeys
  970. {
  971.     UBYTE    Keys[4][4][256];
  972. };
  973.  
  974.     /* Translation table entry. */
  975.  
  976. struct TranslationEntry
  977. {
  978.     STRPTR    String;        /* Corresponding code string. */
  979.     UBYTE    Type;        /* Table entry type. */
  980.     UBYTE    Len;        /* String length if any. */
  981.     UBYTE    Extra;        /* Saves space, don't need to allocate memory for this one. */
  982.     UBYTE    Null;        /* Terminating null. */
  983. };
  984.  
  985. struct TranslationHeader
  986. {
  987.     UBYTE    Type;        /* Table entry type. */
  988.     UBYTE    Code;        /* Table offset. */
  989.     UBYTE    Len;        /* Entry length. */
  990.     BYTE    Pad;
  991. };
  992.  
  993.     /* Buffer translation handle. */
  994.  
  995. struct TranslationHandle
  996. {
  997.     STRPTR            LocalBuffer;
  998.     LONG            LocalLen;
  999.  
  1000.     STRPTR            SourceBuffer;
  1001.     LONG            SourceLen;
  1002.  
  1003.     STRPTR            DestinationBuffer;
  1004.     LONG            DestinationLen;
  1005.  
  1006.     struct TranslationEntry    **Table;
  1007. };
  1008.  
  1009.     /* term hotkey configuration. */
  1010.  
  1011. struct HotkeysOld
  1012. {
  1013.     UBYTE    termScreenToFront[256];
  1014.     UBYTE    BufferScreenToFront[256];
  1015.     UBYTE    SkipDialEntry[256];
  1016.     BOOLEAN    CommodityPriority;
  1017.     BOOLEAN    HotkeysEnabled;
  1018.  
  1019.     ULONG    Reserved[25];
  1020. };
  1021.  
  1022. struct Hotkeys
  1023. {
  1024.     UBYTE    termScreenToFront[256];
  1025.     UBYTE    BufferScreenToFront[256];
  1026.     UBYTE    SkipDialEntry[256];
  1027.     BOOLEAN    CommodityPriority;
  1028.     BOOLEAN    HotkeysEnabled;
  1029.  
  1030.     ULONG    Reserved[25];
  1031.  
  1032.     UBYTE    AbortARexx[256];
  1033. };
  1034.  
  1035.     /* Time/date structure. */
  1036.  
  1037. struct TimeDate
  1038. {
  1039.     LONG    Count;        /* Table size. */
  1040.  
  1041.     ULONG    PayPerUnit[2];    /* Pay for each unit; stored as ten thousands */
  1042.     ULONG    SecPerUnit[2];    /* Number of seconds each unit lasts; stored as ten thousands */
  1043.  
  1044.     UBYTE    Time;        /* The time associated with this entry. */
  1045.     BOOLEAN    Mark;        /* Used by the rates editor to keep track of item being edited. */
  1046. };
  1047.  
  1048. struct TimeDateOld
  1049. {
  1050.     LONG    Count;        /* Table size. */
  1051.     WORD    PayPerUnit[2],    /* Pay for each unit. */
  1052.         SecPerUnit[2];    /* Number of seconds each unit lasts. */
  1053.     UBYTE    Time;        /* The time associated with this entry. */
  1054.     BYTE    Pad;
  1055. };
  1056.  
  1057.     /* Time date header information. */
  1058.  
  1059. struct TimeDateHeader
  1060. {
  1061.     UBYTE    Comment[22];    /* Comment for this entry. */
  1062.  
  1063.     BOOLEAN    Month,        /* Month of year or -1 -> Day = bitmapped days of week. */
  1064.         Day;        /* Day of month or -1 -> standard settings. */
  1065. };
  1066.  
  1067. struct TimeDateNode
  1068. {
  1069.     struct Node         Node;        /* Default node entry. */
  1070.     UBYTE             Buffer[30];    /* Name buffer. */
  1071.  
  1072.     struct TimeDate        *Table;        /* Table of time/date entries. */
  1073.  
  1074.     struct TimeDateHeader     Header;    /* Header information. */
  1075. };
  1076.  
  1077. struct TimeNode
  1078. {
  1079.     struct Node    Node;        /* Default node entry. */
  1080.     UBYTE        Name[20];    /* Name string. */
  1081.     UBYTE        Time;        /* The time for this entry. */
  1082. };
  1083.  
  1084.     /* This node type links phone number patterns
  1085.      * and date/time lists.
  1086.      */
  1087.  
  1088. struct PatternNode
  1089. {
  1090.     struct Node    Node;
  1091.     UBYTE        Pattern[256],
  1092.             Comment[40];
  1093.     struct MinList    List;
  1094. };
  1095.  
  1096.     /* Serial settings. */
  1097.  
  1098. struct SerialSettings
  1099. {
  1100.     ULONG    BaudRate;        /* Baud rate. */
  1101.     ULONG    BreakLength;        /* Length of break signal in microseconds. */
  1102.     ULONG    SerialBufferSize;    /* Size of serial read/write buffer. */
  1103.  
  1104.     UBYTE    SerialDevice[MAX_FILENAME_LENGTH];
  1105.                     /* Serial device name. */
  1106.     LONG    UnitNumber;        /* Serial device unit number. */
  1107.  
  1108.     BYTE    BitsPerChar;        /* Bits per character. */
  1109.     BYTE    Parity;            /* Parity check mode. */
  1110.     BYTE    StopBits;        /* Number of stop bits. */
  1111.     BYTE    HandshakingProtocol;    /* Handshaking protocol (RTS/CTS, etc.). */
  1112.     BOOLEAN    Duplex;            /* Full- or half-duplex? */
  1113.  
  1114.     BOOLEAN    xONxOFF;        /* xON/xOFF handshaking enabled? */
  1115.     BOOLEAN    HighSpeed;        /* Radboogie? */
  1116.     BOOLEAN    Shared;            /* Shared device access? */
  1117.     BOOLEAN    StripBit8;        /* Strip high-order bit? */
  1118.     BOOLEAN    CheckCarrier;        /* Track the carrier signal? */
  1119.     BOOLEAN    PassThrough;        /* Pass xON/xOFF characters through to modem? */
  1120.     BOOLEAN    UseOwnDevUnit;        /* Enable OwnDevUnit.library? */
  1121.  
  1122.     ULONG    Quantum;        /* Buffer read quantum. */
  1123.  
  1124.     BOOLEAN    IgnoreCarrier;        /* Ignore carrier signal. */
  1125.  
  1126.     BOOLEAN    UseNet;            /* Use DNet-ID. */
  1127.     UWORD    NetID;            /* The DNet-ID to use. */
  1128.  
  1129.     BOOLEAN    SatisfyODURequests;    /* How to satisfy ODU requests. */
  1130.     BOOLEAN    DirectConnection;    /* Directly connected to host? */
  1131.  
  1132.     UWORD    LastVersionSaved,    /* The last version the config file was saved with. */
  1133.         LastRevisionSaved;
  1134.  
  1135.     BOOLEAN    ReleaseODUWhenOnline;    /* Release the device even when online? */
  1136.     BOOLEAN    ReleaseODUWhenDialing;    /* Release the device even when dialing? */
  1137.     BOOLEAN    NoODUIfShared;        /* Don't use ODU when device is opened in shared mode? */
  1138.     BYTE    Pad;
  1139. };
  1140.  
  1141.     /* Modem settings. */
  1142.  
  1143. struct ModemSettings
  1144. {
  1145.     UBYTE    ModemInit[80];        /* Modem init string. */
  1146.     UBYTE     ModemExit[80];        /* Modem exit string. */
  1147.     UBYTE     ModemHangup[80];    /* Modem hangup string. */
  1148.     UBYTE    DialPrefix[80];        /* Dial command prefix. */
  1149.     UBYTE    DialSuffix[80];        /* Dial command suffix. */
  1150.  
  1151.     UBYTE    NoCarrier[16];        /* `No carrier' string. */
  1152.     UBYTE    NoDialTone[16];        /* `No dialtone' string. */
  1153.     UBYTE    Connect[16];        /* `Connect' string. */
  1154.     UBYTE    Voice[16];        /* `Voice' string. */
  1155.     UBYTE    Ring[16];        /* `Ring' string. */
  1156.     UBYTE    Busy[16];        /* `Busy' string. */
  1157.  
  1158.     LONG    RedialDelay;        /* Length of redial delay. */
  1159.     LONG    DialRetries;        /* Number of dial retries. */
  1160.     LONG    DialTimeout;        /* Length of dial timeout. */
  1161.     BOOLEAN    ConnectAutoBaud;    /* Use baud rate returned by modem? */
  1162.     BOOLEAN    DropDTR;        /* Drop the DTR signal on hangup? */
  1163.     BOOLEAN    RedialAfterHangup;    /* Redial list after hangup? */
  1164.     BOOLEAN    VerboseDialing;        /* Output modem responses while dialing? */
  1165.  
  1166.     UBYTE    Ok[16];            /* `Ok' string. */
  1167.     UBYTE    Error[16];        /* `Error' string. */
  1168.  
  1169.     BOOLEAN    NoCarrierIsBusy;    /* Treat `NO CARRIER' as `BUSY' signal? */
  1170.     BOOLEAN    AbortHangsUp;        /* Dialer `Abort' sends hangup string? */
  1171.  
  1172.     WORD    ConnectLimit;                /* Connection limit. */
  1173.     UBYTE    ConnectLimitMacro[MAX_FILENAME_LENGTH];    /* Macro to be executed when limit is reached. */
  1174.  
  1175.     LONG    TimeToConnect;        /* Number of seconds to pass between modem picking up
  1176.                      * the line and issuing the `CONNECT' message.
  1177.                      */
  1178.  
  1179.     BOOLEAN    DialMode;        /* Use tone or pulse dialing? */
  1180.     BOOLEAN    DoNotSendMainModemCommands;    /* Do not send modem init/exit commands when dialing and using the main configuration? */
  1181.  
  1182.     LONG    InterDialDelay;        /* Seconds to wait between two successive dial attempts. */
  1183.  
  1184.     LONG    CharSendDelay;        /* Microseconds to wait between chars to send. */
  1185.  
  1186.     UBYTE    PBX_Prefix[80];        /* Additional commands to insert between dial prefix and phone number. */
  1187.     BOOLEAN    PBX_Mode;        /* Send the prefix above. */
  1188.     BYTE    Pad;
  1189. };
  1190.  
  1191.     /* Command settings. */
  1192.  
  1193. struct CommandSettings
  1194. {
  1195.     UBYTE    StartupMacro[256];    /* Startup macro. */
  1196.     UBYTE    LogoffMacro[256];    /* Macro executed after carrier has dropped or hung up. */
  1197.     UBYTE    UploadMacro[256];    /* Macro to execute after a successful upload. */
  1198.     UBYTE    DownloadMacro[256];    /* Macro to execute after a successful download. */
  1199.  
  1200.     UBYTE    LoginMacro[256];    /* Login macro, complements the logoff macro. */
  1201. };
  1202.  
  1203.     /* Screen settings. */
  1204.  
  1205. struct ScreenSettings
  1206. {
  1207.     ULONG    DisplayMode;            /* Screen display mode. */
  1208.     WORD    ColourMode;            /* The terminal colour mode. */
  1209.     UWORD    Colours[16];            /* Colour palette. */
  1210.     UBYTE    FontName[MAX_FILENAME_LENGTH];    /* Default user interface font. */
  1211.     WORD    FontHeight;            /* Default user interface font height. */
  1212.  
  1213.     BOOLEAN    MakeScreenPublic;        /* Are we to make our screen public? */
  1214.     BOOLEAN    ShanghaiWindows;        /* Are we to `shanghai' windows? */
  1215.  
  1216.     BOOLEAN    Blinking;            /* Screen blinking enabled? */
  1217.     BOOLEAN    FasterLayout;            /* Faster screen layout? */
  1218.     BOOLEAN    TitleBar;            /* Is the screen title bar enabled? */
  1219.     BOOLEAN    StatusLine;            /* Which mode is the status line in? */
  1220.  
  1221.     BOOLEAN    UseWorkbench;            /* Use the Workbench screen for the terminal window? */
  1222.  
  1223.     UBYTE    PubScreenName[MAXPUBSCREENNAME + 1];    /* Name of public screen to open window upon. */
  1224.  
  1225.     BOOLEAN    TimeMode;            /* Online time/fee display. */
  1226.     BOOLEAN    Depth;                /* Screen depth if any, 0 = don't bother. */
  1227.  
  1228.     BOOLEAN    UsePens;            /* Use special screen pens? */
  1229.     BYTE    PenColourMode;            /* For which colour mode was the pen array built? */
  1230.  
  1231.     UWORD    PenArray[16];            /* Pen index array. */
  1232.  
  1233.     ULONG    DisplayWidth,            /* Screen width. */
  1234.         DisplayHeight;            /* Screen height. */
  1235.     UWORD    OverscanType;            /* Screen overscan type. */
  1236.  
  1237.     BOOLEAN    ShareScreen;            /* Don't open a backdrop window, share pens. */
  1238.     BOOLEAN    SplitStatus;            /* Split the status line from the main window. */
  1239.  
  1240.     BYTE    Pad;
  1241.     BOOLEAN    UseColours96;            /* Use the 96 bit colours? */
  1242.     ULONG    Colours96[16 * 3];        /* The 96 bit colour table. */
  1243. };
  1244.  
  1245.     /* Terminal settings. */
  1246.  
  1247. struct TerminalSettings
  1248. {
  1249.     BOOLEAN    BellMode;                /* The bell mode. */
  1250.     BOOLEAN    AlertMode;                /* The user alert mode. */
  1251.     BOOLEAN    EmulationMode;                /* The terminal emulation mode. */
  1252.     BOOLEAN    FontMode;                /* The font mode. */
  1253.  
  1254.     BOOLEAN    SendCR;                    /* Standard translations. */
  1255.     BOOLEAN    SendLF;
  1256.     BOOLEAN    ReceiveCR;
  1257.     BOOLEAN    ReceiveLF;
  1258.  
  1259.     UWORD    NumColumns,                /* Size of the terminal window. */
  1260.         NumLines;
  1261.  
  1262.     UBYTE    KeyMapFileName[MAX_FILENAME_LENGTH];    /* Name of custom keymap file. */
  1263.     UBYTE    EmulationFileName[MAX_FILENAME_LENGTH];    /* External emulation file name. */
  1264.     UBYTE    BeepFileName[MAX_FILENAME_LENGTH];    /* Name of the custom beep sound file. */
  1265.  
  1266.     UBYTE    TextFontName[MAX_FILENAME_LENGTH];    /* Terminal text font name. */
  1267.     WORD    TextFontHeight;                /* Terminal text font height. */
  1268.  
  1269.     BOOLEAN    UseTerminalTask;            /* Enable the terminal emulation process. */
  1270.     BOOLEAN    AutoSize;                /* Terminal size should be auto adapted. */
  1271.  
  1272.     UBYTE    IBMFontName[MAX_FILENAME_LENGTH];    /* Terminal text font name. */
  1273.     WORD    IBMFontHeight;                /* Terminal text font height. */
  1274. };
  1275.  
  1276.     /* Path settings. */
  1277.  
  1278. struct PathSettings
  1279. {
  1280.     UBYTE    ASCIIUploadPath[MAX_FILENAME_LENGTH];        /* Default ASCII upload file path. */
  1281.     UBYTE    ASCIIDownloadPath[MAX_FILENAME_LENGTH];        /* Default ASCII download file path. */
  1282.  
  1283.     UBYTE    TextUploadPath[MAX_FILENAME_LENGTH];        /* Default text upload file path. */
  1284.     UBYTE    TextDownloadPath[MAX_FILENAME_LENGTH];        /* Default text download file path. */
  1285.  
  1286.     UBYTE    BinaryUploadPath[MAX_FILENAME_LENGTH];        /* Default binary data upload file path. */
  1287.     UBYTE    BinaryDownloadPath[MAX_FILENAME_LENGTH];    /* Default binary data download file path. */
  1288.  
  1289.     UBYTE    DefaultStorage[MAX_FILENAME_LENGTH];        /* Default configuration storage path. */
  1290.  
  1291.     UBYTE    Editor[MAX_FILENAME_LENGTH];            /* Text file editor to use. */
  1292.  
  1293.     UBYTE    HelpFile[MAX_FILENAME_LENGTH];            /* Help text file. */
  1294. };
  1295.  
  1296.     /* Miscellaneous settings. */
  1297.  
  1298. struct MiscSettings
  1299. {
  1300.     BOOLEAN    Priority;        /* Program priority. */
  1301.     BOOLEAN    BackupConfig;        /* Save the configuration between calls? */
  1302.  
  1303.     BOOLEAN    OpenFastMacroPanel;    /* Open the fast! macro panel? */
  1304.     BOOLEAN    ReleaseDevice;        /* Release serial device when iconified? */
  1305.  
  1306.     BOOLEAN    TransferServer;        /* Enable data transfer server? */
  1307.     BOOLEAN    EmulationServer;    /* Enable terminal emulation server? */
  1308.  
  1309.     BOOLEAN    OverridePath;        /* Override the protocol transfer path? */
  1310.     BOOLEAN    AutoUpload;        /* Enable the auto-upload panel? */
  1311.     BOOLEAN    SetArchivedBit;        /* Set the archived bit for files sent? */
  1312.     BOOLEAN    IdentifyFiles;        /* Try to identify files after download? */
  1313.  
  1314.     BOOLEAN    TransferIcons;        /* Transfer files along with their icons? */
  1315.     BOOLEAN    CreateIcons;        /* Create icons for files saved? */
  1316.  
  1317.     BOOLEAN    SimpleIO;        /* Use simple file I/O? */
  1318.     BOOLEAN    PerfMeter;        /* Transfer performance meter enabled? */
  1319.  
  1320.     LONG    IOBufferSize;        /* Size of the asynchronous I/O buffer. */
  1321.  
  1322.     BOOLEAN    HideUploadIcon;        /* Hide the upload queue icon? */
  1323.     BOOLEAN    ProtectiveMode;        /* Give hints and ask for confirmation? */
  1324.  
  1325.     BOOLEAN    AlertMode;        /* The user alert mode. */
  1326.  
  1327.     BOOLEAN    RequesterMode;        /* Centre, ignore, use preference? */
  1328.  
  1329.     UWORD    RequesterWidth,        /* Width of asl requesters. */
  1330.         RequesterHeight;    /* Height of asl requesters. */
  1331.     UWORD    RequesterLeft,        /* Left edge of asl requesters. */
  1332.         RequesterTop;        /* Top edge of asl requesters. */
  1333.  
  1334.     UBYTE    WaitString[256];    /* String to send repeatedly while the "Wait" code is running. */
  1335.     LONG    WaitDelay;        /* Time to wait between single commands. */
  1336.  
  1337.     UBYTE    WindowName[256];    /* The console window specifier. */
  1338.     BOOLEAN    SuppressOutput;        /* Suppress console output? */
  1339.     BYTE    Pad;
  1340. };
  1341.  
  1342.     /* Clipboard settings. */
  1343.  
  1344. struct ClipSettings
  1345. {
  1346.     WORD    ClipboardUnit;        /* Clipboard unit to use. */
  1347.  
  1348.     WORD    LineDelay,        /* Insert line delay. */
  1349.         CharDelay;        /* Insert character delay. */
  1350.  
  1351.     UBYTE    InsertPrefix[80];    /* Line insertion prefix. */
  1352.     UBYTE    InsertSuffix[80];    /* Line insertion suffix. */
  1353.  
  1354.     UBYTE    LinePrompt[256];    /* Line wait prompt. */
  1355.     WORD    SendTimeout;        /* Line send timeout. */
  1356.     UBYTE    PacingMode;        /* Text pacing mode. */
  1357.     BOOLEAN    ConvertLF;        /* Convert <LF> characters to <CR> */
  1358. };
  1359.  
  1360.     /* Capture and logfile settings. */
  1361.  
  1362. struct CaptureSettings
  1363. {
  1364.     BOOLEAN    LogActions;                /* Create logfile? */
  1365.     BOOLEAN    LogCall;                /* Create callinfo-compatible logfile? */
  1366.     UBYTE    LogFileName[MAX_FILENAME_LENGTH];    /* Default logfile name. */
  1367.  
  1368.     LONG    MaxBufferSize;                /* Maximum text buffer size. */
  1369.     BOOLEAN    BufferEnabled;                /* Is the text buffer enabled? */
  1370.  
  1371.     BOOLEAN    ConnectAutoCapture;            /* Open capture file on logon? */
  1372.     BOOLEAN    CaptureFilterMode;            /* The capture filter mode. */
  1373.     UBYTE    CapturePath[MAX_FILENAME_LENGTH];    /* The default path for capture files. */
  1374.  
  1375.     UBYTE    CallLogFileName[MAX_FILENAME_LENGTH];    /* Name of the call log file. */
  1376.     UBYTE    BufferPath[MAX_FILENAME_LENGTH];    /* Text buffer save path. */
  1377.  
  1378.     BOOLEAN    AutoCaptureDate;            /* Where to include the creation date? */
  1379.     UBYTE    SearchHistory;
  1380.  
  1381.     BOOLEAN    OpenBufferWindow;            /* Where to open the buffer window. */
  1382.     BOOLEAN    OpenBufferScreen;            /* Where to open the buffer screen. */
  1383.  
  1384.     BOOLEAN    BufferScreenPosition;            /* Where to place the buffer screen (horizontal) */
  1385.     UBYTE    BufferWidth;                /* How long each line in the buffer should be. */
  1386.  
  1387.     BOOLEAN    RememberBufferWindow;            /* Remember buffer window context? */
  1388.     BOOLEAN    RememberBufferScreen;            /* Remember buffer screen context? */
  1389.  
  1390.     ULONG    BufferScreenMode;            /* Screen display mode for buffer screen. */
  1391.  
  1392.     BOOLEAN    ConvertChars;                /* Convert IBM characters? */
  1393.     BOOLEAN    BufferMode;                /* How the capture buffer should receive data. */
  1394.  
  1395.     BYTE    LogFileFormat;                /* Format of the log files. */
  1396.     BYTE    Pad;
  1397.  
  1398.     ULONG    BufferSafetyMemory;            /* Don't allocate any further memory if
  1399.                              * this or less memory is still available.
  1400.                              */
  1401. };
  1402.  
  1403.     /* File settings. */
  1404.  
  1405. struct FileSettings
  1406. {
  1407.     UBYTE    ProtocolFileName[MAX_FILENAME_LENGTH];        /* Transfer protocol file name. */
  1408.     UBYTE    TranslationFileName[MAX_FILENAME_LENGTH];    /* Character translation file name. */
  1409.     UBYTE    MacroFileName[MAX_FILENAME_LENGTH];        /* Keyboard macro file name. */
  1410.     UBYTE    CursorFileName[MAX_FILENAME_LENGTH];        /* Cursor key file name. */
  1411.     UBYTE    FastMacroFileName[MAX_FILENAME_LENGTH];        /* Fast macro file name. */
  1412. };
  1413.  
  1414.     /* Emulation settings. */
  1415.  
  1416. struct EmulationSettings
  1417. {
  1418.     BOOLEAN    CursorMode;        /* Are the cursor keys switched to application mode? */
  1419.     BOOLEAN    NumericMode;        /* Is the numeric keypad switched to application mode? */
  1420.  
  1421.     BOOLEAN    CursorWrap;        /* Is cursor position wrapping enabled? */
  1422.     BOOLEAN    LineWrap;        /* Is character line wrapping enabled? */
  1423.  
  1424.     BOOLEAN    InsertMode;        /* Is the character insertion mode enabled? */
  1425.     BOOLEAN    NewLineMode;        /* Is the newline mode enabled? */
  1426.  
  1427.     BOOLEAN    FontScale;        /* Which font scale is enabled? */
  1428.     BOOLEAN    ScrollMode;        /* Is smooth scrolling enabled? */
  1429.     BOOLEAN    DestructiveBackspace;    /* Backspace erases characters? */
  1430.     BOOLEAN    SwapBSDelete;        /* DEL and BS keys are swapped? */
  1431.     BOOLEAN    PrinterEnabled;        /* Printer commands enabled? */
  1432.     BOOLEAN    CLSResetsCursor;    /* Clear screen command resets cursor position? */
  1433.  
  1434.     UBYTE    AnswerBack[80];        /* Answer-back message. */
  1435.  
  1436.     BOOLEAN    KeysLocked;        /* Numeric keypad mode locked? */
  1437.     UBYTE    MaxScroll;        /* Maximum number of lines to prescroll. */
  1438.     UBYTE    MaxJump;        /* Maximum number of lines to scroll in one jump. */
  1439.     BOOLEAN    CursorLocked;        /* Cursor keys locked? */
  1440.     BOOLEAN    FontLocked;        /* Font size locked? */
  1441.     BOOLEAN    LockWrapping;        /* Line wrapping locked? */
  1442.     BOOLEAN    LockStyle;        /* Text style locked? */
  1443.     BOOLEAN    LockColour;        /* Text colour locked? */
  1444.  
  1445.     BOOLEAN    UseStandardPens;    /* Use the standard pens/attributes? */
  1446.     BYTE    TerminalType;        /* How to identify ourselves (VT100 or VT200) */
  1447.  
  1448.     UBYTE    Attributes[4];        /* Attribute mappings. */
  1449.     UWORD    Pens[16];        /* Rendering pens. */
  1450. };
  1451.  
  1452. struct TransferSignature
  1453. {
  1454.     UBYTE    Signature[40];
  1455.     WORD    Length;
  1456. };
  1457.  
  1458.     /* File transfer library settings. */
  1459.  
  1460. struct TransferSettings
  1461. {
  1462.     UBYTE    DefaultLibrary[MAX_FILENAME_LENGTH],
  1463.         ASCIIUploadLibrary[MAX_FILENAME_LENGTH],
  1464.         ASCIIDownloadLibrary[MAX_FILENAME_LENGTH],
  1465.         TextUploadLibrary[MAX_FILENAME_LENGTH],
  1466.         TextDownloadLibrary[MAX_FILENAME_LENGTH],
  1467.         BinaryUploadLibrary[MAX_FILENAME_LENGTH],
  1468.         BinaryDownloadLibrary[MAX_FILENAME_LENGTH];
  1469.     BOOLEAN    InternalASCIIUpload,
  1470.         InternalASCIIDownload,
  1471.         QuietTransfer,
  1472.         MangleFileNames;
  1473.  
  1474.     WORD    LineDelay,        /* Insert line delay. */
  1475.         CharDelay;        /* Insert character delay. */
  1476.  
  1477.     UBYTE    LinePrompt[256];    /* Line wait prompt. */
  1478.     WORD    SendTimeout;        /* Line send timeout. */
  1479.     UBYTE    PacingMode;        /* Text pacing mode. */
  1480.     BOOLEAN    StripBit8;        /* Strip high order bit. */
  1481.     BOOLEAN    IgnoreDataPastArnold;    /* Ignore data past terminator. */
  1482.     UBYTE    TerminatorChar;        /* Terminator character. */
  1483.     BYTE    SendCR,
  1484.         SendLF,
  1485.         ReceiveCR,
  1486.         ReceiveLF;
  1487.  
  1488.     UWORD    ErrorNotification;    /* Notify user after <n> errors have occured. */
  1489.     BYTE    TransferNotification;    /* Notify the user when a transfer has started/finished? */
  1490.     BYTE    DefaultType,
  1491.         ASCIIDownloadType,
  1492.         ASCIIUploadType,
  1493.         TextDownloadType,
  1494.         TextUploadType,
  1495.         BinaryUploadType,
  1496.         BinaryDownloadType;
  1497.  
  1498.     struct TransferSignature Signatures[TRANSFERSIG_BINARYDOWNLOAD + 1];
  1499.  
  1500.     BOOLEAN    OverridePath;        /* Override the protocol transfer path? */
  1501.     BOOLEAN    SetArchivedBit;        /* Set the archived bit for files sent? */
  1502.     BOOLEAN    IdentifyFiles;        /* Try to identify files after download? */
  1503.     BOOLEAN    TransferIcons;        /* Transfer files along with their icons? */
  1504.     BOOLEAN    PerfMeter;        /* Transfer performance meter enabled? */
  1505.     BOOLEAN    HideUploadIcon;        /* Hide the upload queue icon? */
  1506.  
  1507.     UBYTE    IdentifyCommand[256];    /* Command used to identify downloaded files. */
  1508.  
  1509.     BOOLEAN    ExpandBlankLines;    /* Insert spaces when transferring blank text lines? */
  1510.     BYTE    Pad;
  1511. };
  1512.  
  1513.     /* The new configuration settings. */
  1514.  
  1515. struct Configuration
  1516. {
  1517.     struct SerialSettings        *SerialConfig;
  1518.     struct ModemSettings        *ModemConfig;
  1519.     struct ScreenSettings        *ScreenConfig;
  1520.     struct TerminalSettings        *TerminalConfig;
  1521.     struct EmulationSettings    *EmulationConfig;
  1522.     struct ClipSettings        *ClipConfig;
  1523.     struct CaptureSettings        *CaptureConfig;
  1524.     struct CommandSettings        *CommandConfig;
  1525.     struct MiscSettings        *MiscConfig;
  1526.     struct PathSettings        *PathConfig;
  1527.     struct FileSettings        *FileConfig;
  1528.     struct TransferSettings        *TransferConfig;
  1529.  
  1530.     STRPTR                TranslationFileName;
  1531.     STRPTR                MacroFileName;
  1532.     STRPTR                CursorFileName;
  1533.     STRPTR                FastMacroFileName;
  1534.  
  1535.     STRPTR                SpeechFileName;
  1536.     STRPTR                SoundFileName;
  1537.     STRPTR                AreaCodeFileName;
  1538.     STRPTR                PhonebookFileName;
  1539.     STRPTR                HotkeyFileName;
  1540.     STRPTR                TrapFileName;
  1541. };
  1542.  
  1543.     /* A text box for several lines of text. */
  1544.  
  1545. struct TextBox
  1546. {
  1547.     struct TextBox        *NextBox;        /* Next box in chain. */
  1548.  
  1549.     LONG             Left,Top,        /* Position and size. */
  1550.                  Width,Height;
  1551.  
  1552.     LONG             LineWidth,        /* Line width in pixels. */
  1553.                  LineHeight;        /* Line height in pixels. */
  1554.  
  1555.     LONG             NumChars,        /* Number of chars per line. */
  1556.                  NumLines;        /* Number of lines. */
  1557.  
  1558.     STRPTR            *Title,            /* Line titles. */
  1559.                 *Text;            /* Line texts. */
  1560.  
  1561.     LONG             TitleFgPen,
  1562.                  TitleBgPen,
  1563.                  TextPen;
  1564. };
  1565.  
  1566.     /* Block marker structure. */
  1567.  
  1568. struct BlockMarker
  1569. {
  1570.         /* The object to manipulate. */
  1571.  
  1572.     struct RastPort *    RPort;
  1573.  
  1574.         /* Origin anchor point. */
  1575.  
  1576.     LONG            OriginX,
  1577.                 OriginY;
  1578.  
  1579.         /* First and last selected line. */
  1580.  
  1581.     LONG            FirstLine,
  1582.                 LastLine;
  1583.  
  1584.         /* First and last selected column. */
  1585.  
  1586.     LONG            FirstColumn,
  1587.                 LastColumn;
  1588.  
  1589.         /* Top of display window, lines in the buffer and size of
  1590.          * the display window.
  1591.          */
  1592.  
  1593.     LONG            Top,
  1594.                 Lines,
  1595.                 Width,
  1596.                 Height;
  1597.  
  1598.         /* Canvas left and top edge. */
  1599.  
  1600.     LONG            LeftEdge,
  1601.                 TopEdge;
  1602.  
  1603.         /* Last mouse position. */
  1604.  
  1605.     LONG            LastX,
  1606.                 LastY;
  1607.  
  1608.         /* Single character dimensions. */
  1609.  
  1610.     LONG            TextFontWidth,
  1611.                 TextFontHeight;
  1612.  
  1613.         /* Plane write mask. */
  1614.  
  1615.     UBYTE            WriteMask;
  1616. };
  1617.  
  1618.     /* Clipboard marker callback routine. */
  1619.  
  1620. typedef VOID (* MARKER)(struct BlockMarker *,LONG,LONG,LONG,LONG);
  1621.  
  1622.     /* Global data flow <-> term interface. */
  1623.  
  1624. struct FlowInfo
  1625. {
  1626.     BOOLEAN    Changed;
  1627.  
  1628.     BOOLEAN    NoCarrier;
  1629.  
  1630.     BOOLEAN    Connect,
  1631.         Voice,
  1632.         Ring,
  1633.         Busy,
  1634.         NoDialTone,
  1635.         Ok,
  1636.         Error;
  1637.  
  1638.     BOOLEAN    Signature;
  1639. };
  1640.  
  1641.     /* A scan sequence, somewhat similar to the FlowInfo structure. */
  1642.  
  1643. struct WaitNode
  1644. {
  1645.     struct Node    Node;
  1646.     LONG        Count;        /* Number of characters matched. */
  1647.     STRPTR        Response;    /* Immediate response. */
  1648.     LONG        ResponseLen;    /* Length of immediate response string. */
  1649. };
  1650.  
  1651.     /* A rudimentary dial node, as employed by the ARexx interface */
  1652.  
  1653. struct GenericDialNode
  1654. {
  1655.     struct Node    Node;        /* The node name */
  1656.     STRPTR        Number;        /* The number to dial if any */
  1657.     LONG        Index;        /* The phonebook entry to dial */
  1658. };
  1659.  
  1660.     /* A list as employed by the ARexx interface. */
  1661.  
  1662. struct GenericList
  1663. {
  1664.     struct MinList         ListHeader;
  1665.     struct Node        *ListNode;
  1666.     LONG             ListOffset;
  1667.     LONG             ListCount;
  1668.     struct SignalSemaphore     ListSemaphore;
  1669.     APTR             UserData;
  1670.     GENERICNOTIFY         Notify;
  1671. };
  1672.  
  1673.     /* Number of buffers to be used for buffered I/O. */
  1674.  
  1675. #define BUFFER_NUMBER        2
  1676.  
  1677.     /* Auxiliary structure for buffered file I/O. */
  1678.  
  1679. struct Buffer
  1680. {
  1681.     struct Message         Message;            /* Vanilla message header. */
  1682.  
  1683.     struct MsgPort        *InfoPort;            /* The filing system the destination file handle is bound to. */
  1684.     struct InfoData         InfoData;
  1685.  
  1686.     BOOLEAN             SimpleIO;            /* Real simple I/O? */
  1687.     BYTE             Pad;
  1688.  
  1689.     BOOLEAN             Read;                /* Last access has read data. */
  1690.     BOOLEAN             Written;            /* Last access has written data. */
  1691.  
  1692.     LONG             Action;            /* Action to perform. */
  1693.     LONG             ActionData[2];            /* Seek and the like. */
  1694.     LONG             Result;            /* Return value. */
  1695.  
  1696.     BPTR             FileHandle;            /* Dos filehandle. */
  1697.  
  1698.     UBYTE            *Data;                /* Data buffer. */
  1699.     LONG             BufLength;            /* Length of data buffer. */
  1700.  
  1701.     LONG             BufPosition;            /* Read/write pointer into buffer. */
  1702.  
  1703.     LONG             ReadBufFull;            /* How many bytes are still to be read from the buffer? */
  1704.     LONG             WriteBufFull;            /* How many bytes are still to be written to the buffer?*/
  1705.  
  1706.     LONG             RealPosition;            /* Real position in file. */
  1707.     LONG             Cached;            /* How many bytes in pre-load cache. */
  1708.  
  1709.     UBYTE            *DataBuffer[BUFFER_NUMBER];    /* The data buffers. */
  1710.     LONG             DataLength[BUFFER_NUMBER];    /* The lengths of the data buffers. */
  1711.     WORD             DataCount;            /* Which buffer to use. */
  1712.     BOOLEAN             WriteAccess;            /* TRUE if a write file handle. */
  1713.     BOOLEAN             LastActionFailed;        /* TRUE if last action failed -> abort actions. */
  1714.  
  1715.     struct Process        *Child;
  1716.     struct Process        *Caller;            /* Synchronization. */
  1717.  
  1718.     BOOLEAN             Fresh;                /* TRUE if no read/write access has taken place yet. */
  1719.     BOOLEAN             Used;                /* Did any access take place at all? */
  1720.  
  1721.     struct DateStamp     OpenDate;            /* Date and time when file was opened. */
  1722. };
  1723.  
  1724.     /* xpr serial bits. */
  1725.  
  1726. #define ST_PARTYON    (1L << 0)
  1727. #define ST_PARTYODD    (1L << 1)
  1728. #define ST_7WIRE    (1L << 2)
  1729. #define ST_QBREAK    (1L << 3)
  1730. #define ST_RADBOOGIE    (1L << 4)
  1731. #define ST_SHARED    (1L << 5)
  1732. #define ST_EOFMODE    (1L << 6)
  1733. #define ST_XDISABLED    (1L << 7)
  1734. #define ST_PARTYMARKON    (1L << 8)
  1735. #define ST_PARTYMARK    (1L << 9)
  1736. #define ST_2BITS    (1L << 10)
  1737. #define ST_READ7    (1L << 11)
  1738. #define ST_WRITE7    (1L << 12)
  1739.  
  1740.     /* Miscellaneous definitions. */
  1741.  
  1742. #define MILLION        1000000
  1743.  
  1744.     /* Raster text line attributes. */
  1745.  
  1746. #define    ATTR_UNDERLINE    1
  1747. #define    ATTR_HIGHLIGHT    2
  1748. #define ATTR_BLINK    4
  1749. #define    ATTR_INVERSE    8
  1750.  
  1751. enum    {    TEXTATTR_UNDERLINE,TEXTATTR_HIGHLIGHT,
  1752.         TEXTATTR_BLINK,TEXTATTR_INVERSE,
  1753.         TEXTATTR_NONE
  1754.     };
  1755.  
  1756.     /* Audio channels. */
  1757.  
  1758. #define LEFT0F  1
  1759. #define RIGHT0F  2
  1760. #define RIGHT1F  4
  1761. #define LEFT1F  8
  1762.  
  1763.     /* Program revision and the appropriate info structure. */
  1764.  
  1765. struct TermInfo
  1766. {
  1767.     UWORD    Version;
  1768.     UWORD    Revision;
  1769. };
  1770.  
  1771. /**********************************************************************/
  1772.  
  1773.  
  1774.     /* A message queue handle */
  1775.  
  1776. struct MsgQueue
  1777. {
  1778.     struct SignalSemaphore     Access;    /* Access semaphore */
  1779.     struct MinList         MsgList;    /* This is where the queue items go */
  1780.  
  1781.     LONG             QueueSize,    /* The length of the queue */
  1782.                  MaxSize;    /* The maximum size of the queue, may be 0 */
  1783.  
  1784.     struct MinList         WaitList;    /* The list of tasks to wait for a wakeup signal */
  1785.  
  1786.     struct Task        *SigTask;    /* The owner of this handle */
  1787.     ULONG             SigMask;    /* The signal mask to wake up the owner */
  1788.     WORD             SigBit;    /* The bit allocated for the mask, may be -1 */
  1789.  
  1790.     BOOLEAN             Discard;    /* Discard or queue new items? */
  1791. };
  1792.  
  1793.     /* A message item as used by the queue manager */
  1794.  
  1795. struct MsgItem
  1796. {
  1797.     struct MinNode         MinNode;    /* List node link */
  1798.     DESTRUCTOR         Destructor;    /* Destructor routine if any */
  1799. };
  1800.  
  1801.     /* Your simple message item destructor setup */
  1802.  
  1803. #define InitMsgItem(Item,Dest)    (((struct MsgItem *)Item) -> Destructor = (Dest))
  1804.  
  1805.  
  1806. /**********************************************************************/
  1807.  
  1808.  
  1809. enum    {    DATAMSGTYPE_WRITE,DATAMSGTYPE_WRITECLIP,
  1810.         DATAMSGTYPE_UPDATEREVIEW,DATAMSGTYPE_MOVEREVIEW,
  1811.         DATAMSGTYPE_SERIALCOMMAND,DATAMSGTYPE_UPLOAD,
  1812.         DATAMSGTYPE_COMMANDDONE,DATAMSGTYPE_MENU,
  1813.         DATAMSGTYPE_RENDEZVOUS,DATAMSGTYPE_SERIALCOMMANDNOECHO,
  1814.         DATAMSGTYPE_CLEARBUFFER,DATAMSGTYPE_REDIAL,
  1815.         DATAMSGTYPE_HANGUP,DATAMSGTYPE_GOONLINE,
  1816.         DATAMSGTYPE_DIAL,DATAMSGTYPE_WRITESTRING,
  1817.         DATAMSGTYPE_WRITESTRING_NOECHO
  1818.     };
  1819.  
  1820.     /* An extension of the MsgItem data type */
  1821.  
  1822. struct DataMsg
  1823. {
  1824.     struct MsgItem    Item;    /* The message item link */
  1825.  
  1826.     LONG        Type;    /* Message type */
  1827.     UBYTE *        Data;    /* Pointer to data area */
  1828.     LONG        Size;    /* Size of data area */
  1829.  
  1830.     struct Task *    Client;    /* Client task to signal */
  1831.     ULONG        Mask;    /* Client signal mask */
  1832. };
  1833.  
  1834.     /* An extension of the DataMsg data type */
  1835.  
  1836. struct DataReplyMsg
  1837. {
  1838.     struct DataMsg    Data;        /* DataMsg link */
  1839.  
  1840.     struct Task *    Creator;    /* Creator to notify */
  1841.     ULONG        CreatorMask;    /* Creator notification signal */
  1842. };
  1843.  
  1844.     /* Another extension of the DataMsg data type */
  1845.  
  1846. struct DataDialMsg
  1847. {
  1848.     struct DataMsg    Data;        /* DataMsg link */
  1849.  
  1850.     struct RexxMsg *DialMsg;    /* RexxMsg to reply when done */
  1851.     struct List *    DialList;    /* List of entries to dial */
  1852. };
  1853.  
  1854.  
  1855. /**********************************************************************/
  1856.  
  1857.  
  1858.     /* Serial device attributes */
  1859.  
  1860. #define SERA_Baud        TAG_USER+1    /* Baud rate */
  1861. #define SERA_BreakTime        TAG_USER+2    /* Break time */
  1862. #define SERA_BitsPerChar    TAG_USER+3    /* Bits per character */
  1863. #define SERA_StopBits        TAG_USER+4    /* Number of stop bits */
  1864. #define SERA_BufferSize        TAG_USER+5    /* Read/Write buffer size */
  1865. #define SERA_Parity        TAG_USER+6    /* Parity */
  1866. #define SERA_Handshaking    TAG_USER+7    /* Handshaking mode */
  1867. #define SERA_HighSpeed        TAG_USER+8    /* Highspeed mode */
  1868. #define SERA_Shared        TAG_USER+9    /* Shared access */
  1869.  
  1870.  
  1871. /**********************************************************************/
  1872.  
  1873.  
  1874.     /* One of the emulation callback routines. */
  1875.  
  1876. typedef VOID (* EPTR)(STRPTR Buffer);
  1877.  
  1878.     /* This structure describes an ANSI control sequence. */
  1879.  
  1880. struct ControlCode
  1881. {
  1882.     UBYTE    FirstChar;
  1883.     STRPTR    Match,
  1884.         Terminator;
  1885.     UBYTE    LastChar;
  1886.  
  1887.     BYTE    ExactSize;
  1888.     EPTR    Func;
  1889. };
  1890.  
  1891.  
  1892. /**********************************************************************/
  1893.  
  1894.  
  1895.     /* A 96 bit colour entry. */
  1896.  
  1897. typedef struct ColourEntry
  1898. {
  1899.     WORD    One,
  1900.         Which;
  1901.  
  1902.     ULONG    Red,
  1903.         Green,
  1904.         Blue;
  1905. } ColourEntry;
  1906.  
  1907.     /* A table of colour entries, ready for LoadRGB32(). */
  1908.  
  1909. typedef struct ColourTable
  1910. {
  1911.     WORD            NumColours;
  1912.  
  1913.     struct ColourEntry    Entry[0];
  1914.  
  1915.     WORD            Terminator;
  1916. } ColourTable;
  1917.  
  1918.     /* Spread a byte across a long word. */
  1919.  
  1920. #define SPREAD(v)    ((ULONG)(v) << 24 | (ULONG)(v) << 16 | (ULONG)(v) << 8 | (v))
  1921.  
  1922.  
  1923. /**********************************************************************/
  1924.  
  1925.  
  1926.     /* AmigaUW terminal window resize support. */
  1927.  
  1928. #define UWCMD_TTYRESIZE (CMD_NONSTD+20)
  1929.  
  1930.  
  1931. /**********************************************************************/
  1932.  
  1933.  
  1934.     /* A phone list entry. */
  1935.  
  1936. typedef struct PhoneNode
  1937. {
  1938.     struct Node         Node;        /* A standard node header. */
  1939.     UBYTE             LocalName[60];    /* Name of this entry; this includes
  1940.                          * a prefix assigned if this entry is
  1941.                          * marked to go into the dial list.
  1942.                          */
  1943.     struct PhoneEntry    *Entry;        /* Points to the curresponding phonebook entry. */
  1944. } PhoneNode;
  1945.  
  1946.     /* A dial list entry. */
  1947.  
  1948. struct DialNode
  1949. {
  1950.     struct Node        Node;        /* List link */
  1951.     struct PhoneEntry *    Entry;        /* Points to the configuration data */
  1952.     STRPTR            Number;        /* Holds the number to dial if any */
  1953.     BOOL            FromPhonebook;    /* TRUE if this entry was put here because */
  1954.                         /* it was tagged in the phonebook */
  1955.     STRPTR            InitCommand;    /* Modem setup command, if any. */
  1956.     STRPTR            ExitCommand;    /* Modem cleanup command, if any. */
  1957.     STRPTR            DialPrefix;    /* Modem dial prefix, if any. */
  1958.     STRPTR            DialSuffix;    /* Modem dial suffix, if any. */
  1959. };
  1960.  
  1961.     /* Phonebook entry header. */
  1962.  
  1963. typedef struct PhoneHeader
  1964. {
  1965.     UBYTE        Name[40],        /* BBS name. */
  1966.             Number[100],        /* Phone number. */
  1967.             Comment[100];        /* Comment. */
  1968.  
  1969.     UBYTE        UserName[100],        /* User name for this BSS. */
  1970.             Password[100];        /* Password for user name. */
  1971.  
  1972.     BOOLEAN        QuickMenu;        /* This entry appears in the quick dial menu? */
  1973.     BOOLEAN        NoRates;        /* Do not use rate information. */
  1974.  
  1975.     ULONG        ID;            /* Unique ID of this entry. */
  1976.  
  1977.     struct timeval    Creation;        /* Creation time. */
  1978.  
  1979.     BOOLEAN        AutoDial;        /* Put this entry on the autodial list. */
  1980.     BYTE        Pad;
  1981.  
  1982.     LONG        Marked;            /* > 0 if marked for dialing. */
  1983. } PhoneHeader;
  1984.  
  1985.     /* A phonebook entry. */
  1986.  
  1987. typedef struct PhoneEntry
  1988. {
  1989.     struct PhoneNode    *Node;        /* Points back to attached list node if any;
  1990.                          * this node would be on display in the
  1991.                          * phonebook list view.
  1992.                          */
  1993.     struct DialNode        *DialNode;    /* Points back to attached list node if any;
  1994.                          * this node would be on the dial list.
  1995.                          */
  1996.  
  1997.     struct MinList         TimeDateList;    /* Rates and costs. */
  1998.  
  1999.     LONG             Count;        /* Denotes the order in which this entry is to
  2000.                          * go into the dial list. A value < 0 indicates
  2001.                          * that this entry is not going to go into the
  2002.                          * dial list.
  2003.                          */
  2004.  
  2005.     struct PhoneGroupNode    *ThisGroup;    /* The group in which this entry is found. A
  2006.                          * value of NULL indicates that this entry is
  2007.                          * not a memer of a group.
  2008.                          */
  2009.     struct PhoneNode    *GroupNode;    /* Points to the group node attached to this
  2010.                          * entry. A value of NULL indicates that this
  2011.                          * entry is not a member of a group.
  2012.                          */
  2013.  
  2014.     struct PhoneHeader    *Header;    /* Points to phone book header. */
  2015.     struct Configuration    *Config;    /* Points to configuration data. */
  2016. } PhoneEntry;
  2017.  
  2018. typedef struct PhonebookHandle
  2019. {
  2020.     struct PhoneEntry    **Phonebook;        /* Table of phonebook entries. */
  2021.     LONG             PhoneSize;        /* Total size of the phonebook table */
  2022.     LONG             NumPhoneEntries;    /* Number of table entries actually used. */
  2023.     struct MinList         PhoneGroupList;    /* The list of groups used by this phonebook. */
  2024.     ULONG             PhonebookID;        /* A counter every phonebook entry receives
  2025.                              * its unique ID from.
  2026.                              */
  2027.     ULONG             DefaultGroup;        /* Default group to show after loading. */
  2028.     UBYTE             PhonePassword[30];    /* The access password assigned to this phonebook. */
  2029.     BOOLEAN             PhonePasswordUsed;    /* Indicates whether the password is active or not. */
  2030.     BOOLEAN             AutoDial;        /* Indicates whether this phonebook has the
  2031.                              * automatic startup dial feature enabled.
  2032.                              */
  2033.     BOOLEAN             AutoExit;        /* Indicates whether this phonebook has the
  2034.                              * automatic startup dial & exit feature enabled.
  2035.                              */
  2036.     LONG             DialMarker;        /* Number of entries marked for dialing. */
  2037.  
  2038.     struct List        *DialList;        /* The dial list attached to this phonebook. */
  2039.  
  2040.     struct List        *PhoneList;        /* List of phonebook entries, ready to display
  2041.                              * in a list view.
  2042.                              */
  2043.     struct SignalSemaphore     ActiveSemaphore;    /* Must be locked before messing with the active entry. */
  2044.     PhoneEntry        *ActiveEntry;        /* Currently active phonebook entry. */
  2045. } PhonebookHandle;
  2046.  
  2047. typedef struct PhoneGroupNode
  2048. {
  2049.     struct Node         Node;            /* A standard node header. */
  2050.     UBYTE             LocalName[40];        /* The name of the group. */
  2051.     struct MinList         GroupList;        /* The phonebook entries assigned to this group. */
  2052. } PhoneGroupNode;
  2053.  
  2054. typedef struct PhonebookGlobals
  2055. {
  2056.     ULONG             Count;            /* Number of entries in this phonebook */
  2057.     ULONG             ID;            /* ID counter for this phonebook */
  2058.     ULONG             DefaultGroup;        /* Number of the group the phonebook displays when first opened */
  2059.     BOOLEAN             AutoDial;        /* Start dialing after program is started */
  2060.     BOOLEAN             AutoExit;        /* Exit program after list is dialed */
  2061. } PhonebookGlobals;
  2062.  
  2063. typedef struct PhoneGroupHeader
  2064. {
  2065.     UBYTE             FullName[40];        /* Name of this very group */
  2066.     LONG             Count;            /* Number of entries to follow */
  2067.     BYTE             Pad[8];        /* For future extension, if necessary */
  2068. } PhoneGroupHeader;
  2069.  
  2070. typedef struct PhoneListContext
  2071. {
  2072.     PhonebookHandle        *PhoneHandle;        /* The phonebook currently in use */
  2073.     struct List        *CurrentList;        /* List currently being displayed */
  2074.     LONG             NumEntries;        /* Number of entries in that list */
  2075.     STRPTR            *GroupLabels;        /* The labels to go into the group display */
  2076.     struct MsgPort        *WindowPort;        /* The MsgPort to use for the windows attached */
  2077.                                         /* to this control panel */
  2078.     PhoneNode        *SelectedNode;        /* Currently active entry (from the list) */
  2079.     LONG             SelectedIndex;        /* Currently active entry (from the table) */
  2080.  
  2081.     UBYTE             WindowTitle[80];    /* The main window title */
  2082.  
  2083.     LayoutHandle        *Manager;        /* The main window layout handle */
  2084.     LayoutHandle        *Editor;        /* The editor window layout handle */
  2085.     LayoutHandle        *Selector;
  2086.     LayoutHandle        *Grouping;
  2087.     LayoutHandle        *Sorting;
  2088.     LayoutHandle        *PasswordHandle;
  2089.  
  2090.     struct Window        *Window;        /* The main window */
  2091.     struct Window        *EditWindow;
  2092.     struct Window        *PatternWindow;
  2093.     struct Window        *GroupWindow;
  2094.     struct Window        *SortWindow;
  2095.     struct Window        *PasswordWindow;
  2096.  
  2097.     BOOL             Hide;            /* Whether or not password and user name should be hidden */
  2098. } PhoneListContext;
  2099.  
  2100.  
  2101. /**********************************************************************/
  2102.  
  2103.  
  2104.     /* Window backfill support */
  2105.  
  2106. typedef struct LayerMsg
  2107. {
  2108.     ULONG            Layer;
  2109.     struct Rectangle    Bounds;
  2110. } LayerMsg;
  2111.  
  2112.  
  2113. /**********************************************************************/
  2114.  
  2115.  
  2116.     /* Information table entry types. */
  2117.  
  2118. enum    {    INFO_STEM,INFO_TEXT,INFO_NUMERIC,INFO_BOOLEAN,INFO_MAPPED };
  2119.  
  2120.     /* Data types to save or open. */
  2121.  
  2122. enum    {    DATATYPE_TRANSLATIONS,DATATYPE_FUNCTIONKEYS,DATATYPE_CURSORKEYS,
  2123.         DATATYPE_FASTMACROS,DATATYPE_HOTKEYS,DATATYPE_SPEECH,DATATYPE_SOUND,DATATYPE_BUFFER,
  2124.         DATATYPE_CONFIGURATION,DATATYPE_PHONEBOOK,DATATYPE_SCREENTEXT,
  2125.         DATATYPE_SCREENIMAGE,DATATYPE_COUNT };
  2126.  
  2127.     /* Requester types. */
  2128.  
  2129. enum    {    REQUESTER_SERIAL,REQUESTER_MODEM,REQUESTER_SCREEN,
  2130.         REQUESTER_TERMINAL,REQUESTER_EMULATION,REQUESTER_CLIPBOARD,
  2131.         REQUESTER_CAPTURE,REQUESTER_COMMANDS,REQUESTER_MISC,
  2132.         REQUESTER_PATH,REQUESTER_TRANSFER,REQUESTER_TRANSLATIONS,
  2133.         REQUESTER_FUNCTIONKEYS,REQUESTER_CURSORKEYS,REQUESTER_FASTMACROS,
  2134.         REQUESTER_HOTKEYS,REQUESTER_SPEECH,REQUESTER_SOUND,REQUESTER_PHONE,
  2135.         REQUESTER_COUNT };
  2136.  
  2137.     /* Window types. */
  2138.  
  2139. enum    {    WINDOWID_BUFFER,WINDOWID_REVIEW,WINDOWID_PACKET,WINDOWID_FASTMACROS,
  2140.         WINDOWID_STATUS,WINDOWID_MAIN,WINDOWID_UPLOAD_QUEUE,WINDOWID_SINGLE_CHAR_ENTRY,
  2141.         WINDOWID_COUNT
  2142.     };
  2143.  
  2144.     /* The maximum length of an ARexx result variable. */
  2145.  
  2146. #define MAX_RESULT_LEN    65536
  2147.  
  2148.     /* ARexx interface error codes. */
  2149.  
  2150. #define TERMERROR_NO_DATA_TO_PROCESS            1000
  2151. #define TERMERROR_INDEX_OUT_OF_RANGE            1001
  2152. #define TERMERROR_UNKNOWN_OBJECT            1002
  2153. #define TERMERROR_RESULT_VARIABLE_REQUIRED        1003
  2154. #define TERMERROR_UNIT_NOT_AVAILABLE            1004
  2155. #define TERMERROR_DEVICE_DRIVER_STILL_OPEN        1005
  2156. #define TERMERROR_CLIPBOARD_ERROR            1006
  2157. #define TERMERROR_INFORMATION_IS_READ_ONLY        1007
  2158. #define TERMERROR_DATA_TYPES_INCOMPATIBLE        1008
  2159. #define TERMERROR_LIST_IS_ALREADY_EMPTY            1009
  2160. #define TERMERROR_UNKNOWN_LIST                1010
  2161. #define TERMERROR_WRONG_LIST                1011
  2162. #define TERMERROR_UNKNOWN_COMMAND            1012
  2163.  
  2164.     /* An information table entry node. */
  2165.  
  2166. struct AttributeEntry
  2167. {
  2168.     WORD     Level;        /* Node level */
  2169.     STRPTR     Name;        /* Name or NULL for numeric value */
  2170.     UBYTE     Type;        /* Node type (INFO_TEXT through INFO_MAPPED) */
  2171.     BOOLEAN     ReadOnly;    /* If information happens to be read-only */
  2172.     STRPTR    *Mappings;    /* Type mappings if applicable */
  2173.     WORD     NodeID;    /* Node ID code */
  2174. };
  2175.  
  2176.     /* Argument mutual exclusion information. */
  2177.  
  2178. struct ExclusionInfo
  2179. {
  2180.     BYTE    A,B;
  2181. };
  2182.  
  2183.     /* A special message and argument packet. */
  2184.  
  2185. struct RexxPkt
  2186. {
  2187.     struct Message         Message;
  2188.  
  2189.     struct RexxMsg        *RexxMsg;
  2190.     STRPTR            *Array;
  2191.     struct RDArgs        *Args;
  2192.     struct CommandInfo    *CommandInfo;
  2193.     LONG             Results[2];
  2194. };
  2195.  
  2196.     /* A special function key pointer. */
  2197.  
  2198. typedef STRPTR (* COMMAND)(struct RexxPkt *);
  2199.  
  2200.     /* Argument inclusion bits. */
  2201.  
  2202. #define INCLUDE_00 (1 <<  0)
  2203. #define INCLUDE_01 (1 <<  1)
  2204. #define INCLUDE_02 (1 <<  2)
  2205. #define INCLUDE_03 (1 <<  3)
  2206. #define INCLUDE_04 (1 <<  4)
  2207. #define INCLUDE_05 (1 <<  5)
  2208. #define INCLUDE_06 (1 <<  6)
  2209. #define INCLUDE_07 (1 <<  7)
  2210. #define INCLUDE_08 (1 <<  8)
  2211. #define INCLUDE_09 (1 <<  9)
  2212. #define INCLUDE_10 (1 << 10)
  2213. #define INCLUDE_11 (1 << 11)
  2214.  
  2215.     /* Rexx command information. */
  2216.  
  2217. struct CommandInfo
  2218. {
  2219.     BOOLEAN    Async;
  2220.     BOOLEAN    AutoCleanup;
  2221.     COMMAND    Routine;
  2222.     STRPTR    Name,
  2223.         Arguments;
  2224. };
  2225.  
  2226.  
  2227. /**********************************************************************/
  2228.  
  2229.  
  2230. enum    {    ATTR_APPLICATION,
  2231.         ATTR_APPLICATION_VERSION,
  2232.         ATTR_APPLICATION_SCREEN,
  2233.         ATTR_APPLICATION_SESSION,
  2234.         ATTR_APPLICATION_SESSION_ONLINE,
  2235.         ATTR_APPLICATION_SESSION_SESSIONSTART,
  2236.         ATTR_APPLICATION_SESSION_BYTESSENT,
  2237.         ATTR_APPLICATION_SESSION_BYTESRECEIVED,
  2238.         ATTR_APPLICATION_SESSION_CONNECTMESSAGE,
  2239.         ATTR_APPLICATION_SESSION_BBSNAME,
  2240.         ATTR_APPLICATION_SESSION_BBSNUMBER,
  2241.         ATTR_APPLICATION_SESSION_BBSCOMMENT,
  2242.         ATTR_APPLICATION_SESSION_USERNAME,
  2243.         ATTR_APPLICATION_SESSION_ONLINEMINUTES,
  2244.         ATTR_APPLICATION_SESSION_ONLINECOST,
  2245.         ATTR_APPLICATION_AREXX,
  2246.         ATTR_APPLICATION_LASTERROR,
  2247.         ATTR_APPLICATION_TERMINAL,
  2248.         ATTR_APPLICATION_TERMINAL_ROWS,
  2249.         ATTR_APPLICATION_TERMINAL_COLUMNS,
  2250.         ATTR_APPLICATION_BUFFER,
  2251.         ATTR_APPLICATION_BUFFER_SIZE,
  2252.         ATTR_PHONEBOOK,
  2253.         ATTR_PHONEBOOK_COUNT,
  2254.         ATTR_PHONEBOOK_X,
  2255.         ATTR_PHONEBOOK_X_NAME,
  2256.         ATTR_PHONEBOOK_X_NUMBER,
  2257.         ATTR_PHONEBOOK_X_COMMENTTEXT,
  2258.         ATTR_PHONEBOOK_X_USERNAME,
  2259.         ATTR_PHONEBOOK_X_PASSWORDTEXT,
  2260.         ATTR_PREFS_SERIAL,
  2261.         ATTR_PREFS_SERIAL_BAUDRATE,
  2262.         ATTR_PREFS_SERIAL_BREAKLENGTH,
  2263.         ATTR_PREFS_SERIAL_BUFFERSIZE,
  2264.         ATTR_PREFS_SERIAL_DEVICENAME,
  2265.         ATTR_PREFS_SERIAL_UNIT,
  2266.         ATTR_PREFS_SERIAL_BITSPERCHAR,
  2267.         ATTR_PREFS_SERIAL_PARITYMODE,
  2268.         ATTR_PREFS_SERIAL_STOPBITS,
  2269.         ATTR_PREFS_SERIAL_HANDSHAKINGMODE,
  2270.         ATTR_PREFS_SERIAL_DUPLEXMODE,
  2271.         ATTR_PREFS_SERIAL_XONXOFF,
  2272.         ATTR_PREFS_SERIAL_HIGHSPEED,
  2273.         ATTR_PREFS_SERIAL_SHARED,
  2274.         ATTR_PREFS_SERIAL_STRIPBIT8,
  2275.         ATTR_PREFS_SERIAL_CARRIERCHECK,
  2276.         ATTR_PREFS_SERIAL_PASSXONXOFFTHROUGH,
  2277.         ATTR_PREFS_SERIAL_QUANTUM,
  2278.         ATTR_PREFS_SERIAL_USE_OWNDEVUNIT,
  2279.         ATTR_PREFS_SERIAL_OWNDEVUNIT_REQUEST,
  2280.         ATTR_PREFS_SERIAL_DIRECT_CONNECTION,
  2281.         ATTR_PREFS_SERIAL_RELEASE_WHEN_ONLINE,
  2282.         ATTR_PREFS_SERIAL_RELEASE_WHEN_DIALING,
  2283.         ATTR_PREFS_SERIAL_NO_ODU_IF_SHARED,
  2284.         ATTR_PREFS_SERIAL_LOCAL_ECHO,
  2285.         ATTR_PREFS_MODEM,
  2286.         ATTR_PREFS_MODEM_MODEMINITTEXT,
  2287.         ATTR_PREFS_MODEM_MODEMEXITTEXT,
  2288.         ATTR_PREFS_MODEM_MODEMHANGUPTEXT,
  2289.         ATTR_PREFS_MODEM_DIALPREFIXTEXT,
  2290.         ATTR_PREFS_MODEM_DIALSUFFIXTEXT,
  2291.         ATTR_PREFS_MODEM_NOCARRIERTEXT,
  2292.         ATTR_PREFS_MODEM_NODIALTONETEXT,
  2293.         ATTR_PREFS_MODEM_CONNECTTEXT,
  2294.         ATTR_PREFS_MODEM_VOICETEXT,
  2295.         ATTR_PREFS_MODEM_RINGTEXT,
  2296.         ATTR_PREFS_MODEM_BUSYTEXT,
  2297.         ATTR_PREFS_MODEM_OKTEXT,
  2298.         ATTR_PREFS_MODEM_ERRORTEXT,
  2299.         ATTR_PREFS_MODEM_REDIALDELAY,
  2300.         ATTR_PREFS_MODEM_DIALRETRIES,
  2301.         ATTR_PREFS_MODEM_DIALTIMEOUT,
  2302.         ATTR_PREFS_MODEM_CONNECTAUTOBAUD,
  2303.         ATTR_PREFS_MODEM_HANGUPDROPSDTR,
  2304.         ATTR_PREFS_MODEM_REDIALAFTERHANGUP,
  2305.         ATTR_PREFS_MODEM_VERBOSEDIALING,
  2306.         ATTR_PREFS_MODEM_NOCARRIERISBUSY,
  2307.         ATTR_PREFS_MODEM_CONNECTLIMIT,
  2308.         ATTR_PREFS_MODEM_CONNECTLIMITMACRO,
  2309.         ATTR_PREFS_MODEM_TIME_TO_CONNECT,
  2310.         ATTR_PREFS_MODEM_DIAL_MODE,
  2311.         ATTR_PREFS_MODEM_INTER_DIAL_DELAY,
  2312.         ATTR_PREFS_MODEM_CHAR_SEND_DELAY,
  2313.         ATTR_PREFS_MODEM_DO_NOT_SEND_COMMANDS,
  2314.         ATTR_PREFS_MODEM_PBX_PREFIX,
  2315.         ATTR_PREFS_MODEM_PBX_MODE,
  2316.         ATTR_PREFS_COMMANDS,
  2317.         ATTR_PREFS_COMMANDS_STARTUPMACROTEXT,
  2318.         ATTR_PREFS_COMMANDS_LOGOFFMACROTEXT,
  2319.         ATTR_PREFS_COMMANDS_UPLOADMACROTEXT,
  2320.         ATTR_PREFS_COMMANDS_DOWNLOADMACROTEXT,
  2321.         ATTR_PREFS_COMMANDS_LOGINMACROTEXT,
  2322.         ATTR_PREFS_SCREEN,
  2323.         ATTR_PREFS_SCREEN_WINDOW_BORDER,
  2324.         ATTR_PREFS_SCREEN_SPLIT_STATUS,
  2325.         ATTR_PREFS_SCREEN_COLOURMODE,
  2326.         ATTR_PREFS_SCREEN_FONTNAME,
  2327.         ATTR_PREFS_SCREEN_FONTSIZE,
  2328.         ATTR_PREFS_SCREEN_MAKESCREENPUBLIC,
  2329.         ATTR_PREFS_SCREEN_SHANGHAIWINDOWS,
  2330.         ATTR_PREFS_SCREEN_BLINKING,
  2331.         ATTR_PREFS_SCREEN_FASTERLAYOUT,
  2332.         ATTR_PREFS_SCREEN_TITLEBAR,
  2333.         ATTR_PREFS_SCREEN_STATUSLINEMODE,
  2334.         ATTR_PREFS_SCREEN_USEWORKBENCH,
  2335.         ATTR_PREFS_SCREEN_PUBSCREENNAME,
  2336.         ATTR_PREFS_SCREEN_ONLINEDISPLAY,
  2337.         ATTR_PREFS_SCREEN_USEPENS,
  2338.         ATTR_PREFS_TERMINAL,
  2339.         ATTR_PREFS_TERMINAL_BELLMODE,
  2340.         ATTR_PREFS_TERMINAL_EMULATIONMODE,
  2341.         ATTR_PREFS_TERMINAL_FONTMODE,
  2342.         ATTR_PREFS_TERMINAL_SENDCRMODE,
  2343.         ATTR_PREFS_TERMINAL_SENDLFMODE,
  2344.         ATTR_PREFS_TERMINAL_RECEIVECRMODE,
  2345.         ATTR_PREFS_TERMINAL_RECEIVELFMODE,
  2346.         ATTR_PREFS_TERMINAL_NUMCOLUMNS,
  2347.         ATTR_PREFS_TERMINAL_NUMLINES,
  2348.         ATTR_PREFS_TERMINAL_KEYMAPNAME,
  2349.         ATTR_PREFS_TERMINAL_EMULATIONNAME,
  2350.         ATTR_PREFS_TERMINAL_FONTNAME,
  2351.         ATTR_PREFS_TERMINAL_FONTSIZE,
  2352.         ATTR_PREFS_TERMINAL_USETERMINALPROCESS,
  2353.         ATTR_PREFS_TERMINAL_AUTOSIZE,
  2354.         ATTR_PREFS_PATHS,
  2355.         ATTR_PREFS_PATHS_ASCIIUPLOADPATH,
  2356.         ATTR_PREFS_PATHS_ASCIIDOWNLOADPATH,
  2357.         ATTR_PREFS_PATHS_TEXTUPLOADPATH,
  2358.         ATTR_PREFS_PATHS_TEXTDOWNLOADPATH,
  2359.         ATTR_PREFS_PATHS_BINARYUPLOADPATH,
  2360.         ATTR_PREFS_PATHS_BINARYDOWNLOADPATH,
  2361.         ATTR_PREFS_PATHS_CONFIGPATH,
  2362.         ATTR_PREFS_PATHS_EDITORNAME,
  2363.         ATTR_PREFS_PATHS_HELPFILENAME,
  2364.         ATTR_PREFS_MISC,
  2365.         ATTR_PREFS_MISC_PRIORITY,
  2366.         ATTR_PREFS_MISC_BACKUPCONFIG,
  2367.         ATTR_PREFS_MISC_OPENFASTMACROPANEL,
  2368.         ATTR_PREFS_MISC_RELEASEDEVICE,
  2369.         ATTR_PREFS_MISC_OVERRIDEPATH,
  2370.         ATTR_PREFS_MISC_AUTOUPLOAD,
  2371.         ATTR_PREFS_MISC_SETARCHIVEDBIT,
  2372.         ATTR_PREFS_MISC_COMMENTMODE,
  2373.         ATTR_PREFS_MISC_TRANSFERICONS,
  2374.         ATTR_PREFS_MISC_CREATEICONS,
  2375.         ATTR_PREFS_MISC_SIMPLEIO,
  2376.         ATTR_PREFS_MISC_TRANSFER_PERFMETER,
  2377.         ATTR_PREFS_MISC_IOBUFFERSIZE,
  2378.         ATTR_PREFS_MISC_HIDE_UPLOAD_ICON,
  2379.         ATTR_PREFS_MISC_OVERWRITE_WARNING,
  2380.         ATTR_PREFS_MISC_ALERTMODE,
  2381.         ATTR_PREFS_MISC_REQUESTERMODE,
  2382.         ATTR_PREFS_MISC_REQUESTERWIDTH,
  2383.         ATTR_PREFS_MISC_REQUESTERHEIGHT,
  2384.         ATTR_PREFS_MISC_WAITSTRING,
  2385.         ATTR_PREFS_MISC_WAITDELAY,
  2386.         ATTR_PREFS_MISC_CONSOLEWINDOW,
  2387.         ATTR_PREFS_MISC_SUPPRESSOUTPUT,
  2388.         ATTR_PREFS_CLIPBOARD,
  2389.         ATTR_PREFS_CLIPBOARD_UNIT,
  2390.         ATTR_PREFS_CLIPBOARD_LINEDELAY,
  2391.         ATTR_PREFS_CLIPBOARD_CHARDELAY,
  2392.         ATTR_PREFS_CLIPBOARD_INSERTPREFIXTEXT,
  2393.         ATTR_PREFS_CLIPBOARD_INSERTSUFFIXTEXT,
  2394.         ATTR_PREFS_CLIPBOARD_TEXTPACING,
  2395.         ATTR_PREFS_CLIPBOARD_LINEPROMPT,
  2396.         ATTR_PREFS_CLIPBOARD_SENDTIMEOUT,
  2397.         ATTR_PREFS_CLIPBOARD_CONVERTLF,
  2398.         ATTR_PREFS_CAPTURE,
  2399.         ATTR_PREFS_CAPTURE_LOGACTIONS,
  2400.         ATTR_PREFS_CAPTURE_LOGCALLS,
  2401.         ATTR_PREFS_CAPTURE_LOGFILENAME,
  2402.         ATTR_PREFS_CAPTURE_MAXBUFFERSIZE,
  2403.         ATTR_PREFS_CAPTURE_BUFFER,
  2404.         ATTR_PREFS_CAPTURE_CONNECTAUTOCAPTURE,
  2405.         ATTR_PREFS_CAPTURE_AUTOCAPTUREDATE,
  2406.         ATTR_PREFS_CAPTURE_CAPTUREFILTER,
  2407.         ATTR_PREFS_CAPTURE_CAPTUREPATH,
  2408.         ATTR_PREFS_CAPTURE_CALLLOGFILENAME,
  2409.         ATTR_PREFS_CAPTURE_BUFFERSAVEPATH,
  2410.         ATTR_PREFS_CAPTURE_OPENBUFFERWINDOW,
  2411.         ATTR_PREFS_CAPTURE_OPENBUFFERSCREEN,
  2412.         ATTR_PREFS_CAPTURE_BUFFERSCREENPOSITION,
  2413.         ATTR_PREFS_CAPTURE_BUFFERWIDTH,
  2414.         ATTR_PREFS_CAPTURE_REMEMBER_BUFFERWINDOW,
  2415.         ATTR_PREFS_CAPTURE_REMEMBER_BUFFERSCREEN,
  2416.         ATTR_PREFS_CAPTURE_SEARCH_HISTORY,
  2417.         ATTR_PREFS_CAPTURE_CONVERTCHARACTERS,
  2418.         ATTR_PREFS_CAPTURE_BUFFERMODE,
  2419.         ATTR_PREFS_CAPTURE_BUFFERSAFETYMEMORY,
  2420.         ATTR_PREFS_FILE,
  2421.         ATTR_PREFS_FILE_TRANSFERPROTOCOLNAME,
  2422.         ATTR_PREFS_FILE_TRANSLATIONFILENAME,
  2423.         ATTR_PREFS_FILE_MACROFILENAME,
  2424.         ATTR_PREFS_FILE_CURSORFILENAME,
  2425.         ATTR_PREFS_FILE_FASTMACROFILENAME,
  2426.         ATTR_PREFS_EMULATION,
  2427.         ATTR_PREFS_EMULATION_IDENTIFICATION,
  2428.         ATTR_PREFS_EMULATION_CURSORMODE,
  2429.         ATTR_PREFS_EMULATION_NUMERICMODE,
  2430.         ATTR_PREFS_EMULATION_CURSORWRAP,
  2431.         ATTR_PREFS_EMULATION_LINEWRAP,
  2432.         ATTR_PREFS_EMULATION_INSERTMODE,
  2433.         ATTR_PREFS_EMULATION_NEWLINEMODE,
  2434.         ATTR_PREFS_EMULATION_FONTSCALEMODE,
  2435.         ATTR_PREFS_EMULATION_SCROLLMODE,
  2436.         ATTR_PREFS_EMULATION_DESTRUCTIVEBACKSPACE,
  2437.         ATTR_PREFS_EMULATION_SWAPBSDELETE,
  2438.         ATTR_PREFS_EMULATION_CURSORLOCKED,
  2439.         ATTR_PREFS_EMULATION_FONTLOCKED,
  2440.         ATTR_PREFS_EMULATION_NUMPADLOCKED,
  2441.         ATTR_PREFS_EMULATION_PRINTERENABLED,
  2442.         ATTR_PREFS_EMULATION_ANSWERBACKTEXT,
  2443.         ATTR_PREFS_EMULATION_CLS_RESETS_CURSOR,
  2444.         ATTR_PREFS_EMULATION_MAXSCROLL,
  2445.         ATTR_PREFS_EMULATION_MAXJUMP,
  2446.         ATTR_PREFS_EMULATION_WRAPLOCKED,
  2447.         ATTR_PREFS_EMULATION_STYLELOCKED,
  2448.         ATTR_PREFS_EMULATION_COLOURLOCKED,
  2449.         ATTR_PREFS_EMULATION_USEPENS,
  2450.         ATTR_PREFS_TRANSFER,
  2451.         ATTR_PREFS_TRANSFER_DEFAULT_LIBRARY,
  2452.         ATTR_PREFS_TRANSFER_ASCII_UPLOAD_LIBRARY,
  2453.         ATTR_PREFS_TRANSFER_INTERNAL_ASCII_UPLOAD,
  2454.         ATTR_PREFS_TRANSFER_ASCII_DOWNLOAD_LIBRARY,
  2455.         ATTR_PREFS_TRANSFER_INTERNAL_ASCII_DOWNLOAD,
  2456.         ATTR_PREFS_TRANSFER_QUIET_TRANSFER,
  2457.         ATTR_PREFS_TRANSFER_TEXT_UPLOAD_LIBRARY,
  2458.         ATTR_PREFS_TRANSFER_TEXT_DOWNLOAD_LIBRARY,
  2459.         ATTR_PREFS_TRANSFER_BINARY_UPLOAD_LIBRARY,
  2460.         ATTR_PREFS_TRANSFER_BINARY_DOWNLOAD_LIBRARY,
  2461.         ATTR_PREFS_TRANSFER_MANGLE_FILE_NAMES,
  2462.         ATTR_PREFS_TRANSFER_LINEDELAY,
  2463.         ATTR_PREFS_TRANSFER_CHARDELAY,
  2464.         ATTR_PREFS_TRANSFER_TEXTPACING,
  2465.         ATTR_PREFS_TRANSFER_LINEPROMPT,
  2466.         ATTR_PREFS_TRANSFER_SENDTIMEOUT,
  2467.         ATTR_PREFS_TRANSFER_STRIP_BIT_8,
  2468.         ATTR_PREFS_TRANSFER_IGNORE_DATA_PAST_ARNOLD,
  2469.         ATTR_PREFS_TRANSFER_TERMINATOR_CHAR,
  2470.         ATTR_PREFS_TRANSFER_ERROR_NOTIFY_COUNT,
  2471.         ATTR_PREFS_TRANSFER_ERROR_NOTIFY_WHEN,
  2472.         ATTR_PREFS_TRANSFER_OVERRIDEPATH,
  2473.         ATTR_PREFS_TRANSFER_SETARCHIVEDBIT,
  2474.         ATTR_PREFS_TRANSFER_COMMENTMODE,
  2475.         ATTR_PREFS_TRANSFER_TRANSFERICONS,
  2476.         ATTR_PREFS_TRANSFER_TRANSFER_PERFMETER,
  2477.         ATTR_PREFS_TRANSFER_HIDE_UPLOAD_ICON,
  2478.         ATTR_PREFS_TRANSFER_DEFAULT_TYPE,
  2479.         ATTR_PREFS_TRANSFER_DEFAULT_SEND_SIGNATURE,
  2480.         ATTR_PREFS_TRANSFER_DEFAULT_RECEIVE_SIGNATURE,
  2481.         ATTR_PREFS_TRANSFER_ASCII_UPLOAD_TYPE,
  2482.         ATTR_PREFS_TRANSFER_ASCII_UPLOAD_SIGNATURE,
  2483.         ATTR_PREFS_TRANSFER_ASCII_DOWNLOAD_TYPE,
  2484.         ATTR_PREFS_TRANSFER_ASCII_DOWNLOAD_SIGNATURE,
  2485.         ATTR_PREFS_TRANSFER_TEXT_UPLOAD_TYPE,
  2486.         ATTR_PREFS_TRANSFER_TEXT_UPLOAD_SIGNATURE,
  2487.         ATTR_PREFS_TRANSFER_TEXT_DOWNLOAD_TYPE,
  2488.         ATTR_PREFS_TRANSFER_TEXT_DOWNLOAD_SIGNATURE,
  2489.         ATTR_PREFS_TRANSFER_BINARY_UPLOAD_TYPE,
  2490.         ATTR_PREFS_TRANSFER_BINARY_UPLOAD_SIGNATURE,
  2491.         ATTR_PREFS_TRANSFER_BINARY_DOWNLOAD_TYPE,
  2492.         ATTR_PREFS_TRANSFER_BINARY_DOWNLOAD_SIGNATURE,
  2493.         ATTR_PREFS_TRANSFER_IDENTIFY_COMMAND,
  2494.         ATTR_PREFS_TRANSFER_EXPAND_BLANK_LINES,
  2495.         ATTR_PREFS_SPEECH,
  2496.         ATTR_PREFS_SPEECH_RATE,
  2497.         ATTR_PREFS_SPEECH_PITCH,
  2498.         ATTR_PREFS_SPEECH_FREQUENCY,
  2499.         ATTR_PREFS_SPEECH_SEXMODE,
  2500.         ATTR_PREFS_SPEECH_VOLUME,
  2501.         ATTR_PREFS_SPEECH_SPEECH,
  2502.         ATTR_PREFS_TRANSLATIONS,
  2503.         ATTR_PREFS_TRANSLATIONS_X,
  2504.         ATTR_PREFS_TRANSLATIONS_X_SEND,
  2505.         ATTR_PREFS_TRANSLATIONS_X_RECEIVE,
  2506.         ATTR_PREFS_FASTMACROS,
  2507.         ATTR_PREFS_FASTMACROS_COUNT,
  2508.         ATTR_PREFS_FASTMACROS_X,
  2509.         ATTR_PREFS_FASTMACROS_X_NAME,
  2510.         ATTR_PREFS_FASTMACROS_X_CODE,
  2511.         ATTR_PREFS_HOTKEYS,
  2512.         ATTR_PREFS_HOTKEYS_TERMSCREENTOFRONTTEXT,
  2513.         ATTR_PREFS_HOTKEYS_BUFFERSCREENTOFRONTTEXT,
  2514.         ATTR_PREFS_HOTKEYS_SKIPDIALENTRYTEXT,
  2515.         ATTR_PREFS_HOTKEYS_ABORTAREXX,
  2516.         ATTR_PREFS_HOTKEYS_COMMODITYPRIORITY,
  2517.         ATTR_PREFS_HOTKEYS_HOTKEYSENABLED,
  2518.         ATTR_PREFS_CURSORKEYS,
  2519.         ATTR_PREFS_CURSORKEYS_UPTEXT,
  2520.         ATTR_PREFS_CURSORKEYS_RIGHTTEXT,
  2521.         ATTR_PREFS_CURSORKEYS_DOWNTEXT,
  2522.         ATTR_PREFS_CURSORKEYS_LEFTTEXT,
  2523.         ATTR_PREFS_CURSORKEYS_SHIFT,
  2524.         ATTR_PREFS_CURSORKEYS_SHIFT_UPTEXT,
  2525.         ATTR_PREFS_CURSORKEYS_SHIFT_RIGHTTEXT,
  2526.         ATTR_PREFS_CURSORKEYS_SHIFT_DOWNTEXT,
  2527.         ATTR_PREFS_CURSORKEYS_SHIFT_LEFTTEXT,
  2528.         ATTR_PREFS_CURSORKEYS_ALT,
  2529.         ATTR_PREFS_CURSORKEYS_ALT_UPTEXT,
  2530.         ATTR_PREFS_CURSORKEYS_ALT_RIGHTTEXT,
  2531.         ATTR_PREFS_CURSORKEYS_ALT_DOWNTEXT,
  2532.         ATTR_PREFS_CURSORKEYS_ALT_LEFTTEXT,
  2533.         ATTR_PREFS_CURSORKEYS_CONTROL,
  2534.         ATTR_PREFS_CURSORKEYS_CONTROL_UPTEXT,
  2535.         ATTR_PREFS_CURSORKEYS_CONTROL_RIGHTTEXT,
  2536.         ATTR_PREFS_CURSORKEYS_CONTROL_DOWNTEXT,
  2537.         ATTR_PREFS_CURSORKEYS_CONTROL_LEFTTEXT,
  2538.         ATTR_PREFS_FUNCTIONKEYS,
  2539.         ATTR_PREFS_FUNCTIONKEYS_X,
  2540.         ATTR_PREFS_FUNCTIONKEYS_SHIFT,
  2541.         ATTR_PREFS_FUNCTIONKEYS_SHIFT_X,
  2542.         ATTR_PREFS_FUNCTIONKEYS_ALT,
  2543.         ATTR_PREFS_FUNCTIONKEYS_ALT_X,
  2544.         ATTR_PREFS_FUNCTIONKEYS_CONTROL,
  2545.         ATTR_PREFS_FUNCTIONKEYS_CONTROL_X,
  2546.         ATTR_PREFS_PROTOCOL,
  2547.         ATTR_PREFS_CONSOLE,
  2548.         ATTR_PREFS_SOUND,
  2549.         ATTR_PREFS_SOUND_BELLNAME,
  2550.         ATTR_PREFS_SOUND_CONNECTNAME,
  2551.         ATTR_PREFS_SOUND_DISCONNECTNAME,
  2552.         ATTR_PREFS_SOUND_GOODTRANSFERNAME,
  2553.         ATTR_PREFS_SOUND_BADTRANSFERNAME,
  2554.         ATTR_PREFS_SOUND_RINGNAME,
  2555.         ATTR_PREFS_SOUND_VOICENAME,
  2556.         ATTR_PREFS_SOUND_PRELOAD,
  2557.         ATTR_PREFS_SOUND_ERROR,
  2558.         ATTR_PREFS_SOUND_VOLUME
  2559.     };
  2560.  
  2561.  
  2562. /**********************************************************************/
  2563.  
  2564.  
  2565.     /* How many characters we will keep in the scan buffer. */
  2566.  
  2567. #define MAX_SCAN_SIZE    255
  2568.  
  2569. typedef struct ParseContext
  2570. {
  2571.     STRPTR    pc_Arnie;
  2572.     WORD    pc_CharsInBuffer,
  2573.         pc_ScanStep;
  2574.     UBYTE    pc_SaveBuffer[MAX_SCAN_SIZE + 1];
  2575.  
  2576.     UBYTE    pc_LineBuffer[BUFFER_LINE_MAX + 1];
  2577.     WORD    pc_LineLen,
  2578.         pc_LineIndex;
  2579.  
  2580.     BOOLEAN    pc_InSequence;
  2581. } ParseContext;
  2582.  
  2583.  
  2584. /**********************************************************************/
  2585.  
  2586.  
  2587.     /* Sound replay information. */
  2588.  
  2589. struct SoundInfo
  2590. {
  2591.     UBYTE         Name[MAX_FILENAME_LENGTH];
  2592.  
  2593.     ULONG         Rate,
  2594.              Length,
  2595.              Volume;
  2596.  
  2597.     APTR         SoundData;
  2598.  
  2599.     APTR         LeftData,
  2600.              RightData;
  2601.  
  2602.     Object        *SoundObject;
  2603.     struct timeval     SoundTime;
  2604. };
  2605.  
  2606.  
  2607. /**********************************************************************/
  2608.  
  2609.  
  2610.     /* Text buffer private data (render info & window). */
  2611.  
  2612. typedef struct TextBufferInfo
  2613. {
  2614.     UWORD             Left,Top,
  2615.                  Width,Height;
  2616.  
  2617.     struct Process        *Buddy;
  2618.  
  2619.     struct Window        *Window;
  2620.     struct Screen        *Screen;
  2621.     struct Menu        *BufferMenuStrip;
  2622.  
  2623.     BYTE             BufferSignal;
  2624.     BOOLEAN             BufferTerminated;
  2625.  
  2626.     struct RastPort        *RPort;
  2627.  
  2628.     LONG             NumBufferLines,
  2629.                  NumBufferColumns,
  2630.                  LastTopLine;
  2631.  
  2632.     struct DrawInfo        *BufferDrawInfo;
  2633.     struct Image        *BufferAmigaGlyph,
  2634.                 *BufferCheckGlyph;
  2635.  
  2636.     struct TextFont        *LocalFont;
  2637.  
  2638.     WORD             LocalTextFontWidth,
  2639.                  LocalTextFontHeight;
  2640.  
  2641.     struct TTextAttr     LocalTextFont;
  2642.     UBYTE             LocalTextFontName[MAX_FILENAME_LENGTH];
  2643.  
  2644.     struct TTextAttr     LocalUserFont;
  2645.     UBYTE             LocalUserFontName[MAX_FILENAME_LENGTH];
  2646.  
  2647.     LONG             TopLine,
  2648.                  DisplayedLines;
  2649.  
  2650.     BOOL             SearchForward,
  2651.                  IgnoreCase,
  2652.                  WholeWords,
  2653.                  NeedClipConversion;
  2654.  
  2655.     Object            *Scroller,
  2656.                 *UpArrow,
  2657.                 *DownArrow;
  2658.  
  2659.     Object            *UpImage,
  2660.                 *DownImage;
  2661.  
  2662.     LONG             ArrowWidth;
  2663.  
  2664.     UWORD            *BufferLineOffsets,
  2665.                 *BufferColumnOffsets;
  2666.  
  2667.     UWORD             TitleFrontPen,
  2668.                  TitleBackPen,
  2669.                  TextFrontPen,
  2670.                  TextBackPen;
  2671.  
  2672.     WORD             OldColumn,
  2673.                  OldLine,
  2674.                  OldLength;
  2675.  
  2676.     LONG             TitleOffset;
  2677.     LONG             MaxPen;
  2678.     WORD             RightBorderWidth;
  2679.  
  2680.     struct Screen        *Parent;
  2681.  
  2682.     UBYTE             TitleBuffer[100];
  2683.  
  2684.     struct MsgQueue        *Queue;
  2685.     ULONG             QueueMask;
  2686.  
  2687.     struct MarkerContext    *Marker;
  2688.     BOOLEAN             Interrupted;
  2689.     BYTE             Pad[3];
  2690.  
  2691.     BOOL            *pSearchForward;
  2692.     BOOL            *pIgnoreCase;
  2693.     BOOL            *pWholeWords;
  2694.     LONG            *pTopLine;
  2695. } TextBufferInfo;
  2696.  
  2697.  
  2698. /**********************************************************************/
  2699.  
  2700.  
  2701.     /* The catalog data is stored in the following format. */
  2702.  
  2703. struct CatCompArrayType
  2704. {
  2705.     ULONG    cca_ID;
  2706.     STRPTR    cca_Str;
  2707. };
  2708.  
  2709.  
  2710. /**********************************************************************/
  2711.  
  2712.  
  2713. #ifdef __GNUC__
  2714. struct LaunchMsg;
  2715. #endif    /* __GNUC__ */
  2716.  
  2717.     /* This is what we can do. */
  2718.  
  2719. enum    { LAUNCH_Program,LAUNCH_RexxCmd,LAUNCH_RexxString };
  2720.  
  2721.     /* A callback routine to handle the cleanup work. */
  2722.  
  2723. typedef VOID (*LAUNCHCLEANUP)(struct LaunchMsg *Message);
  2724.  
  2725. typedef struct LaunchMsg
  2726. {
  2727.     struct Message     Message;    /* Standard message header. */
  2728.  
  2729.     WORD         Type;        /* What type of command this message implements. */
  2730.  
  2731.     struct RexxPkt    *RexxPkt;    /* An ARexx interface command packet. */
  2732.  
  2733.     LONG         Result;    /* Primary result code. */
  2734.     LONG         Result2;    /* Secondary result code. */
  2735.  
  2736.     LAUNCHCLEANUP     Cleanup;    /* A cleanup routine that gets call when all the work is done. */
  2737.  
  2738.     UBYTE         Command[1];    /* The command to execute, if any. */
  2739. } LaunchMsg;
  2740.  
  2741.  
  2742. /**********************************************************************/
  2743.  
  2744.  
  2745. #ifdef __GNUC__
  2746. struct JobNode;
  2747. struct JobQueue;
  2748. #endif    /* __GNUC__ */
  2749.  
  2750. typedef BOOL (*JOBFUNCTION)(struct JobNode *);
  2751.  
  2752. typedef ULONG (*JOBQUEUEWAIT)(struct JobQueue *);
  2753.  
  2754.     /* The job types supported. */
  2755.  
  2756. enum { JOBTYPE_Once,JOBTYPE_Always,JOBTYPE_Disposable,JOBTYPE_Wait };
  2757.  
  2758. typedef struct JobNode
  2759. {
  2760.     struct Node         Node;        /* Link and name. */
  2761.     WORD             Type;        /* Job type. */
  2762.     BOOL             Active;    /* Whether or not this job is currently active. */
  2763.  
  2764.     struct JobQueue        *HomeQueue;    /* In which queue to find this job. */
  2765.  
  2766.     JOBFUNCTION         Function;    /* The function to invoke. */
  2767.     JOBFUNCTION         SubFunction;    /* If necessary, the function invoked by
  2768.                          * the default entry point.
  2769.                          */
  2770.     ULONG             Mask;        /* Signal to wait for. */
  2771. } JobNode;
  2772.  
  2773. typedef struct JobQueue
  2774. {
  2775.     struct MinList         ReadyList;    /* List of jobs ready for execution. */
  2776.  
  2777.     ULONG             ReadyMask;    /* Signal mask to wait for events. */
  2778.     LONG             OnceCounter;    /* Number of jobs to call once only. */
  2779.  
  2780.     JobNode            *NextJob;    /* The next job to execute. */
  2781.  
  2782.     JOBQUEUEWAIT         QueueWait;    /* The routine to wait for events to happen. */
  2783.  
  2784.     struct SignalSemaphore     AccessLock;    /* Access lock for this data structure. */
  2785. } JobQueue;
  2786.  
  2787.     /* To initialize the jobs from scratch. */
  2788.  
  2789. struct JobInitStruct
  2790. {
  2791.     STRPTR        Name;        /* Name of this job, if any. */
  2792.     JobNode **    Node;        /* The node to initialize. */
  2793.     JOBFUNCTION    Function;    /* The function to invoke. */
  2794.     WORD        Type;        /* The job type. */
  2795. };
  2796.  
  2797. /**********************************************************************/
  2798.  
  2799.     /* For LimitedVSprintf() and friends. */
  2800.  
  2801. struct FormatContext
  2802. {
  2803.     STRPTR    Index;
  2804.     LONG    Size;
  2805. };
  2806.  
  2807. /**********************************************************************/
  2808.  
  2809. enum
  2810. {
  2811.     MARKERASK_Clipped,
  2812.     MARKERASK_Scroll
  2813. };
  2814.  
  2815.     /* Ask for the mouse position to be converted into a line and column index. */
  2816.  
  2817. typedef VOID (*MARKER_AskPosition)(struct MarkerContext *Context,LONG *Column,LONG *Line,WORD Mode);
  2818.  
  2819.     /* Scroll the visible region. */
  2820.  
  2821. typedef VOID (*MARKER_Scroll)(struct MarkerContext *Context,LONG DeltaX,LONG DeltaY);
  2822.  
  2823.     /* Highlight a line of text between the "Left" and "Right" column (inclusive).
  2824.      * If both parameters are < 0 the entire line should be highlighted.
  2825.      */
  2826.  
  2827. typedef VOID (*MARKER_Highlight)(struct MarkerContext *Context,LONG Line,LONG Left,LONG Right);
  2828.  
  2829.     /* Transfer the buffer contents line by line. */
  2830.  
  2831. typedef APTR (*MARKER_TransferStartStop)(struct MarkerContext *Context,APTR UserData,ULONG Qualifier);
  2832. typedef BOOL (*MARKER_Put)(APTR UserData,STRPTR Buffer,LONG Length);
  2833. typedef BOOL (*MARKER_Transfer)(struct MarkerContext *Context,LONG Line,LONG Left,LONG Right,MARKER_Put Put,APTR UserData);
  2834. typedef BOOL (*MARKER_PickWord)(struct MarkerContext *Context,LONG Left,LONG Top,LONG *WordLeft,LONG *WordRight);
  2835.  
  2836. typedef struct MarkerContext
  2837. {
  2838.     LONG    FirstVisibleLine,    /* The first line visible on the screen. */
  2839.         NumVisibleLines;    /* The number of lines visible on the screen. */
  2840.     LONG    NumLines;        /* The number of text lines in the buffer. */
  2841.  
  2842.     LONG    FirstVisibleColumn,    /* The first column visible on the screen. */
  2843.         NumVisibleColumns;    /* The number of columns visible on the screen. */
  2844.     LONG    NumColumns;        /* The number of text columns used by the buffer. */
  2845.  
  2846.     LONG    AnchorColumn,        /* The current marker anchor position on the anchor line. */
  2847.         AnchorLine;        /* The line on which the marker is anchored. */
  2848.  
  2849.     LONG    CurrentColumn,        /* This is where the mouse pointer currently is. */
  2850.         CurrentLine;
  2851.  
  2852.     LONG    FirstFullLine,        /* The first and the last line that is completely highlighted. */
  2853.         LastFullLine;
  2854.  
  2855.     LONG    FirstPartialLine,    /* The first line that has text marked in it. */
  2856.         FirstPartialLeft,    /* The first column in which text is marked (inclusive). */
  2857.         FirstPartialRight;    /* The last column in which text is marked (inclusive). */
  2858.  
  2859.     LONG    LastPartialLine,    /* The last line that has text marked in it. */
  2860.         LastPartialLeft,    /* The first column in which text is marked (inclusive). */
  2861.         LastPartialRight;    /* The last column in which text is marked (inclusive). */
  2862.  
  2863.     LONG    Direction;        /* If -1, user is dragging the mouse towards the top left corner,
  2864.                      * otherwise user is dragging the mouse towards the bottom right corner.
  2865.                      */
  2866.  
  2867.         /* Ask for the mouse position to be converted into a line and column index. */
  2868.  
  2869.     MARKER_AskPosition AskPosition;
  2870.  
  2871.         /* Scroll the visible region. */
  2872.  
  2873.     MARKER_Scroll Scroll;
  2874.  
  2875.         /* Highlight a line of text between the "Left" and "Right" column (inclusive).
  2876.          */
  2877.  
  2878.     MARKER_Highlight Highlight;
  2879.  
  2880.         /* Unhighlight a line of text between the "Left" and "Right" column (inclusive).
  2881.          */
  2882.  
  2883.     MARKER_Highlight Unhighlight;
  2884.  
  2885.         /* Prepare for data transfer or clean up after the transfer. */
  2886.  
  2887.     MARKER_TransferStartStop TransferStartStop;
  2888.  
  2889.         /* Transfer the contents of a buffer line. */
  2890.  
  2891.     MARKER_Transfer Transfer;
  2892.  
  2893.         /* Called by the Transfer function. */
  2894.  
  2895.     MARKER_Put Put;
  2896.     MARKER_Put PutLine;
  2897.  
  2898.         /* Pick the word at the given position. */
  2899.  
  2900.     MARKER_PickWord PickWord;
  2901.  
  2902.         /* User defined data. */
  2903.  
  2904.     APTR UserData;
  2905. } MarkerContext;
  2906.  
  2907. /**********************************************************************/
  2908.  
  2909.     /* And now for something completely different... */
  2910.  
  2911. #ifndef _PROTOS_H
  2912. #include "Protos.h"
  2913. #endif    /* _PROTOS_H */
  2914.  
  2915. #ifndef _DATA_H
  2916. #include "Data.h"
  2917. #endif    /* _DATA_H */
  2918.  
  2919. #ifndef _ERRORS_H
  2920. #include "Errors.h"
  2921. #endif    /* _ERRORS_H */
  2922.  
  2923. #endif    /* _GLOBAL_H */
  2924.